Well, that is what I thought was happening originally, but as I went through all the different tests I finally figured out that the ecaping occurred when you write the xml to a file.
Sent with my Android phone On Sep 11, 2010 12:57 AM, "Raymond Camden" <[email protected]> wrote: > > Btw - I have to say I was very confused initially because it sounded > like you were saying the _original_ value was being escaped. Ie, you > put S into X (x being an xml object, S being a string w/ html) and S > changed, not X. > > Anyway - going to blog this up around noon. > > > On Wed, Sep 8, 2010 at 8:40 PM, Raymond Camden <[email protected]> wrote: >> Woot! Found it: >> >> http://www.mail-archive.com/[email protected]/msg312892.html >> >> I have _never_ seen this in use, but it works perfectly: >> >> >> <cfset s = "<font color=""red""><b>foo</b></font>"> >> <cfxml variable="x"> >> <root> >> <child name="one" /> >> </root> >> </cfxml> >> <cfdump var="#x#"> >> <cfset x.root.child[1].xmlCData = s> >> >> >> <cfoutput> >> #x.root.child[1].xmltext# >> <p> >> #s# >> </cfoutput> >> >> <cffile action="write" file="#expandPath('foo.xml')#" output="#toString(x)#"> >> >> On Wed, Sep 8, 2010 at 8:38 PM, Raymond Camden <[email protected]> wrote: >>> I'm digging. This came up 3 years ago too: >>> >>> http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32864 >>> >>> >>> On Wed, Sep 8, 2010 at 4:54 PM, Jake Munson <[email protected]> wrote: >>>> >>>> Ray, >>>> >>>> In addition to my previous email with proof of concept code, I am able to reproduce my problem using your code below by adding this cffile tag to the end of your code: >>>> <cffile action="write" file="#expandPath('foo.xml')#" output="#toString(x)#"> >>>> >>>>>Weird. I can't reproduce this: >>>>> >>>>> >>>>><cfset s = "<font color=""red""><b>foo</b></font>"> >>>>><cfxml variable="x"> >>>>><root> >>>>><child name="one" /> >>>>></root> >>>>></cfxml> >>>>> >>>>><cfset x.root.child[1].xmlText = s> >>>>> >>>>> >>>>><cfoutput> >>>>>#x.root.child[1].xmltext# >>>>><p> >>>>>#s# >>>>></cfoutput> >>>>> >>>>>The value is NOT escaped in the XML, nor in the original variable. >>>>> >>>>> >>>>> >>>>>>> >>>> >>>> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:336939 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

