> I have been messing with XML quite a bit lately, and am running into
> problems passing special characters inside an XML file.  The biggest problem
> is that the data is largely user controlled (Meaning I have no control!)
> 
> I wrote a function that basically sanitizes all the contents of an XML tag
> and replaces any special characters, but I am sure there is a better way of
> passing this type of information around.  Specifically I have had problems
> with & < and "

you want to use cdata:

http://www.w3.org/TR/2006/REC-xml11-20060816/#sec-cdata-sect

--
ray

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to