House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

XMLFormatted Characters

  << Previous Post |  RSS |  Tree View |  Sort Oldest First |  Subscribe to this Group Next >> 

XMLFormatted Characters

Don't destroy raw data - only do formatting when outputting. Peter Boughton 02/05/2009 08:35 AM
Not a direct answer, but you could not touch the special characters (not Adrian Lynch 02/05/2009 04:45 AM
Hi All, Duane Boudreau 01/06/2009 09:18 AM

02/05/2009 08:35 AM
Author: Peter Boughton Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:58441#318931 Don't destroy raw data - only do formatting when outputting. Also, many people recommend HtmlEditFormat over XmlFormat for outputting to HTML. So, if you have an original variable HtmlData containing unescaped characters... - Use HtmlEditFormat(HtmlData) to convert for HTML output. - And JsStringFormat(HtmlData) to display in a JS alert box. (although I'm not sure why the JS alert isn't dealing with the entities properly.) If you do actually need to convert from HTML entity to actual character... I'd probably use a Java Regex replace with a callback function. That could fix any hex or decimal entities easily enough, with just a little bit more effort required to compile a lookup for named entities. (If anyone wants to go that route and can't find an existing function, I don't mind throwing it together (later tonight), but only if I'm not reinventing a wheel that already exists - i.e. someone search cflib/etc and if there's nothing on there I'll add one)
02/05/2009 04:45 AM
Author: Adrian Lynch Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:58441#318926 Not a direct answer, but you could not touch the special characters (not sure why they're called special characters, they're not THAT special!) and instead use CDATA islands when generating the XML files. Adrian ----- Excess quoted text cut - see Original Post for more -----
01/06/2009 09:18 AM
Author: Duane Boudreau Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:58441#317447 Hi All, I?m using XMLFormat to convert special characters in strings to their HTML equivalents. This works fine as long as the strings are being displayed in plain HTML but causes problems when I try to output the strings in using an alert box. Does know how to convert XMLFormatted characters back to their original form? ex: ó to รณ Thanks, Duane
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference