2008/2/5 Wieringa Timotheus <[EMAIL PROTECTED]>:
>
> The "alert(content)" gives me ["blabla","bla","dved","dwq"] back.

Ok, so it looks like the content you're getting back from the server
should be valid, and qx.io.Json.parse() should, in theory, accept it.
Would you please try two things:

First, comment out the initial code in qx.io.Json.parse() that checks
the text against the regular expression.  See if the eval then
succeeds.  (Alternatively, you can temporarily replace your call to
qx.io.Json.parse(content) with eval("(" + content + ")") and see if it
succeeds.  (Don't leave it like that, though.  You're opening yourself
up to possible attack by not validating the incoming data.)

Assuming that worked, please try replacing that if statement at the
beginning (the one with the regular expression) with this one:

if (!(/^[\],:{}\s]*$/.test(text.replace(/\\./g, '@').
replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
']').
replace(/(?:^|:|,)(?:\s*\[)+/g, ''))))

and see if it then works.  (Don't forget to switch back to calling
qx.io.Json.parse() if you had switched to eval().)  The regular
expression I've provided here is the one currently being recommended
for verifying that text to be eval()ed isn't "nasty".  The problem
with this new one is that it excludes 'new' object instantiation which
we explicitly require for JSON-RPC (new Date()).  If this regular
expression solves your problem, see if you can figure out why the
original regular expression thinks there is something wrong with your
data.

Cheers,

Derrell

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to