As far as I know, CF will not encode HTML unless you tell it to. Are you 100% sure you aren't using htmlEditFormat on the data?
On Fri, Sep 3, 2010 at 3:06 PM, Jake Munson <[email protected]> wrote: > > I have an XML object that was populated from an XML file. This XML comes > from an external system that I do not control. Here is the bit of XML that > I'm struggling with: > <parks> > <park> > <SiteAbstract> > <![CDATA[<font color="#045172"><b>Loveridge Bridge North</b></font>]]> > </SiteAbstract> > </park> > </parks> > I know this is valid XML...at least it works in the system that uses it. > > I am trying to write an updated value to this SiteAbstract tag, and the > result will show up in this external system. As you can see, the HTML inside > the tag is NOT htmlencodedformat, it's just plain HTML. Since SiteAbstract > is using the CDATA tag, this is fine. > > The trouble is that when I try to insert HTML into this tag, ColdFusion is > converting the HTML to entity tags. Normally this would be fine, as people > usually don't want plain HTML in XML. But with this external system I need > to preserve the HTML as is. I have googled and dug in the docs for a while > now and I can't find a way to force ColdFusion to leave the HTML as is. > > The only solution I have come up with (and this is NOT what I'd prefer to do) > is to do <cfloop file="myXMLfile.xml", search for the XML tag I need to > update (this part will be painful) and then manually change the XML tag > contents and save the XML to disk. > > Any better ideas? > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336829 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

