I’m bringing in XML that comes with things like
>; I want these decoded to display properly in a string as their entities (“smart” quotes,
> signs). How can I do this, preferably without either including a library or resorting to a big decoding map?
Note that I do NOT want to generate HTML content on the page; I just want to see the characters. So far I made it as far in Closure as safehtml, but I don’t know if I’m barking up the wrong tree (Closure digging can be an arduous task).
As a further explanation, these html codes are being place into a data html argument which is rendered in a
content: field by the CSS. In other words, I think i’m looking for a way to convert html-entities into css-entities. This is on-topic, if not a solution: https://www.w3schools.com/cssref/css_entities.asp
Further find: it looks like .net has this covered with CssEncode. Strange nothing is forthcoming in Closure/Clojurescript.