Re: [PHP4BETA] WDDX Character data
| From: | Andrei Zmievski | Date: | Thu, 04 May 2000 13:08:05 +0000 |
| Subject: | Re: [PHP4BETA] WDDX Character data | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-14462@lists.php.net to get a copy of this message | ||
On Thu, 04 May 2000, Andrew Smith wrote:
> Is it possible to have the serialize functions in WDDX escape "<" and
> "&"
> since at the moment strings containing those characters get serialised
> correctly but cause the deserialize function to fall over.
>
> Normally this wouldn't be a problem since when creating the structures
> before serialisation I can escape them myself, however I'm currently
> serialising trees and when I unserialise them to edit a node, expat changes
> all my & and < to & and <. This means that even though I'm only
> editing one node in the tree I have to parse every other node to escape the
> special characters before serialising the structure again.
>
> I'm not all that experienced at reading DTD's but from what I can gather
> since in WDDX strings are not stored between <![CDATA[]]>, then section 2.4
> of the XML 1.0 spec (http://www.w3.org/TR/REC-xml#syntax) says that "<" and
> "&" *must* be escaped. Can anyone more experienced shed some light on
> whether this is possible/desirable in the php implementation? Is it allowed
> by the WDDX DTD? Would it break much existing code? Does an #implied CDATA
> section not have to escape them, just like a real CDATA? and I guess most
> importantly will it cause problems for other implementations of WDDX?
I'll take a look at it.
-Andrei
* Who is Ray and why would we want to selectively trace him? *