Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Probe description does not support <br> HTML or list item markdown #642

Closed
mcomella opened this issue Jun 2, 2021 · 3 comments
Closed

Comments

@mcomella
Copy link

mcomella commented Jun 2, 2021

The old metrics.md supported html tags like <br> and list items (lines starting with -) (example:
image

However, the probe dictionary doesn't support it (example):
image

Without lists or the ability to add paragraphs, it makes it difficult (for me) to write information about complex probes clearly.

@mcomella mcomella changed the title Probe description does not support HTML or list item markdown Probe description does not support <br> HTML or list item markdown Jun 2, 2021
@wlach
Copy link
Contributor

wlach commented Jun 2, 2021

Yeah, we intentionally escape some of the markdown in the description. The problem was that people were unintentionally adding HTML tags (without quoting) in the metrics files, which caused weird issues on occasion (see e.g. mozilla-mobile/fenix#19243). On reflection, the right answer is probably just to fix these issues in the source, rather than remove flexibility on what people can do to avoid footguns. I'll try to address this.

That said, lists and paragraphs are supported in markdown without having to write HTML, using plain old markdown syntax. You should be able to express what you need to for your metric above in a more legible way by doing that.

@mcomella
Copy link
Author

mcomella commented Jun 2, 2021

That said, lists and paragraphs are supported in markdown without having to write HTML, using plain old markdown syntax. You should be able to express what you need to for your metric above in a more legible way by doing that.

Ah, this wasn't the case in the metrics.md file so I used HTML tags to work around it. 😆 It sounds better to just use markdown though – I'll do this going forward.

@wlach
Copy link
Contributor

wlach commented Sep 29, 2021

I filed a bug in glean parser to handle invalid HTML in the future: https://bugzilla.mozilla.org/show_bug.cgi?id=1733256

I'm going to just literally render anything passed in for the Glean Dictionary from now on, PR incoming...

wlach added a commit that referenced this issue Sep 29, 2021
To make it less likely that people will accidentally throw in an HTML tag,
we could possibly check inside the glean parser for valid HTML, where it
is specified: https://bugzilla.mozilla.org/show_bug.cgi?id=1733256
wlach added a commit that referenced this issue Sep 29, 2021
To make it less likely that people will accidentally throw in an HTML tag,
we could possibly check inside the glean parser for valid HTML, where it
is specified: https://bugzilla.mozilla.org/show_bug.cgi?id=1733256
@wlach wlach closed this as completed in 8dc9923 Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants