I need a way to transform numeric HTML entities into their plain-text character equivalent. For example, I would like to turn the entity:
é
Thanks to Todd Sharp for pointing out a very simple way to do this, using the Apache Commons StringEscapeUtils library, which is packaged with CF (and Railo), so you can just do:
That linked function is icky - there's no need to name them explicitly, and as you say it doesn't do numerics.
Much simpler is to let CF do the work for you - using the XmlParse function:
#Arguments.Entity#').XmlRoot.XmlText />
That one works with Railo, I can't remember if CF supports that syntax yet though, so you might need to change it to:
#Arguments.Entity#') />