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

Whitelist various inline semantic/formatting tags #306

Conversation

chris-morgan
Copy link
Contributor

Mostly I want <abbr>, but the rest of these should also be whitelisted.

What goes in LIMITED.elements seems to be a bit subjective, but I think that <mark> and <abbr> at least are reasonably justified. <dfn> is fairly obscure, and <small>, <bdo>, <cite>, <span>, <time> and <wbr> a bit different from the rest and probably not justified, so I left them out.

In the absence of styling, <span> is quite useless, but <div>’s there already, and people have asked for <span> (#183), so I figured, why not?

Fixes #183.

Mostly I want <abbr>, but the rest of these should also be whitelisted.

What goes in LIMITED.elements seems to be a bit subjective, but I think
that <mark> and <abbr> at least are reasonably justified. <dfn> is
fairly obscure, and <small>, <bdo>, <cite>, <span>, <time> and <wbr> a
bit different from the rest and probably not justified, so I left them
out.

In the absence of styling, <span> is quite useless, but <div>’s there
already, and people have asked for <span> (gjtorikian#183), so I figured, why not?

Fixes gjtorikian#183.
@gjtorikian gjtorikian merged commit 07e5292 into gjtorikian:master Jan 4, 2019
@gjtorikian
Copy link
Owner

Seems reasonable, thank you for your contribution.

@gjtorikian
Copy link
Owner

This is out now as 2.9.2.

@bpj
Copy link

bpj commented Jan 4, 2019

Spans are not entirely useless without styling. They can be given an id an used as anchors. This is useful e.g. in Pandoc which has a native span syntax. Besides <a name=...> has been deprecated for ages.

@chris-morgan
Copy link
Contributor Author

True, though I think normally you want to put the ID on something else (typically a heading). I had forgotten about that use case.

@chris-morgan chris-morgan deleted the whitelist-abbr-and-various-other-inline-semantic-elements branch January 4, 2019 22:22
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

Successfully merging this pull request may close these issues.

3 participants