Welcome to Codidact Meta!
Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.
Should HTML entities be supported in titles?
I just noticed that HTML entities (such as ℵ for ℵ or — for —) seem not to be supported in titles.
Should they be?
Clarification:
I'm not asking for general HTML support in titles, just of HTML entities. Note that entities cannot encode anything that you won't find in the Unicode character set, so anything you can do with them can already be done by adding those characters directly, just with more effort.
An example where this would be handy (and where I noticed that they are not supported) is in this question on Languages & Linguistics where I used the character “ℵ“ in the title (as well as the uppercase Greek “Α”, but there I could have gone with just using a normal uppercase A instead). I ended up copy/pasting it from the actual question text (where entities are supported), but that meant additional effort that could have been avoided.
For me it would also be sufficient to support named entities; if I figure out the Unicode code point of a character, it's no more effort to type the character itself using that number than it is to type the corresponding numeric HTML entity. I don't know if all relevant systems support character entry by code point, though.
Note: I've added the feature-request tag to this post.
1 answer
We reviewed this and have decided to leave titles as text-only, but we have a workaround that we hope isn't too difficult.
To support HTML entities we'd have to run titles through HTML rendering, which adds an opening for security risks. Sure, we have those with the body already, but this would be one more place where we'd have to guard against problematic inputs for an infrequent use case. However, titles do support Unicode (demonstrated in the L&L question you linked), and post bodies support HTML entities. If you don't happen to know the keyboard commands for the character you want, you can type the HTML entity in the post body and then cut/paste the result from the rendered preview. (If you're using several, you might find it easier to do the entire title that way.)
I hope this workaround isn't too much of an imposition. If there are cases where this approach really doesn't work, please let us know.
0 comment threads