Expanding on that, how about looping through the FORM scope before
serializing it.

<cfloop collection="#FORM#" item="i">
<cfset FORM[i] = XMLFormat(FORM[i])>
</cfloop>

Ade

-----Original Message-----
From: Adam Haskell [mailto:[EMAIL PROTECTED]
Sent: 27 August 2004 18:57
To: CF-Talk
Subject: Re: WDDX error

Ok if you XMlformat the entide WDDX string itd going to escape all the
<> in the WDDX . You could try something like this:

wddxstuff = xmlformat(wddxstuff);
wddxstuff =replace(wddxstuff ,'&lt;','<','all');
wddxstuff =replace(wddxstuff ,'&gt;','>','all');
wddxstuff =replace(wddxstuff ,'&amp;&amp;','&amp;','all');

Problem is if you have something like <description> 5>6</description>
the > is still not getting escaped and it will still blow up.

Adam H

On Fri, 27 Aug 2004 13:38:35 -0400, Richard Strong
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> We have a form that saves a query in  a wddx packet. On the submit, if
> there are any invalid characters (like &) in the wddx packet it dies:
> WDDX packet parse error at line 1, column -1. Illegal character or
> entity reference syntax..
>
> Any idea how to fix it?
>
> Thanks
> Richard
>
> PS I have tried also to use xmlFormat, but then complains about missing
root
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to