Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users

Dashboard
Notifications
Mark all as read
Q&A

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?

+5
−1

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.

Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comments

1 answer

+0
−0

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.

Why does this post require moderator attention?
You might want to add some details to your flag.

3 comments

Thank you for your answer. While I'm not happy with the workaround, I can live with it. However I disagree with one statement: You'd not have to pass it through an HTML parser; a search/replace adequately can handle entities just fine (and also allows to decide which entities to handle). I however totally understand if you don't want to put the work in for that; I just wanted to point out that supporting entities is not only (or even best) achieved by running a full HTML parser on it. celtschk‭ 9 days ago

@celtschk‭ thanks for pointing that out. I wonder if there's a library or something that already implements this entity-to-rendering (or entity-to-Unicode) translation. Monica Cellio‭ 9 days ago

@MonicaCellio: A quick search turns up this. celtschk‭ 9 days ago

Sign up to answer this question »

This community is part of the Codidact network. We have other communities too — take a look!

You can also join us in chat!

Want to advertise this community? Use our templates!