NameText.h header
#include <ew/app/NameText.h>
Namespace ew::app
Functions
QString ew::app::content::decodeEntityReferences(const QString &name)
name with HTML character references decoded, and unchanged when it has none.
Applied where names ENTER the project rather than where they are shown: decoding at the display end would hide the split without healing it, leaving two categories that look identical.
Only the references that can appear in a name are decoded – the five XML predefined entities and the numeric forms. A name is not markup, so anything else is left exactly as typed rather than guessed at; a writer who really wants "♥" in a title keeps it.
bool ew::app::content::hasEntityReference(const QString &name)
Whether name carries an HTML character reference – "Lore & Concepts" rather than "Lore & Concepts".
A real name never contains one. When one appears it is because escaped text reached a name-setting path unescaped-once-too-few: an assistant reading HTML and passing it straight to a create tool is the way it happens here. Worth detecting on its own, because the damage is not the odd spelling – it is that "Lore & Concepts" and "Lore & Concepts" are two different names, so the project silently grows a twin of a category with the entities split between them.