I have a Flex/Actionscript 3 application that displays RSS feeds in a Text element. It strips out any HTML formatting present, but it’s not handling HTML special entity codes properly — it’s rendering &mdash as the literal string instead of replacing it with an em-dash, etc. Is there any systematic way I can make it handle those codes properly, or am I going to need to manually replace those strings regex style?
Edit: Some aspects of Flex behavior that are relevant: both text and htmlText handle a limited subset of the characters properly with no further tweaking — <, >,  , etc. (In fact, text actually handles them a little better than htmlText, as the latter treats < as a literal less-than character.) But there’s a much larger set of characters (°, &mdash, and many others) that aren’t handled properly — at least, not by default.
Here is one way:
Credit where credit is due: this code was optimised by an acquaintance of mine (Tim Hawkins) which was modified from the original Flash HTML Entities Suck.