At 17:24 +0300 21/5/09, Vladimir Tkach wrote:
>Prototype gsub error?
>
>$H({s:'\'}).toJSON()
>
>Result : SyntaxError: unterminated string literal

I /think/, though the experts hereabouts will confirm or otherwise, 
that JavaScript thinks the \ is escaping the quote that comes after 
it. To do what you want, I believe you'd have to escape the backslash 
in turn:

$H({s:'\\'}).toJSON()

I hope that's right!

-- 
Cheers... Chris
Highway 57 Web Development -- http://highway57.co.uk/

Why do you necessarily have to be wrong just because
a few million people think you are?
    -- Frank Zappa

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to