Forum Moderators: open

Message Too Old, No Replies

prototype ajax routine removes escaped quotes

         

distorto

8:47 pm on Oct 8, 2008 (gmt 0)

10+ Year Member



this is driving me batty. I am properly escaping my single quotes in php (for example 'I'm going to tell y'all what' is coming out of the php function as 'I\'m going to tell y\'all what' )

but the escape characters are being removed when I pull the string out (in js routine). Does anyone know how to fix this?

I'm using prototype for ajax on this site. I'm eval() - ing the json object on the js side and then the strings have no escape characters. could it be something happening with eval?

thanks

distorto

9:00 pm on Oct 8, 2008 (gmt 0)

10+ Year Member



ok, I get it - eval is evaluating the string, thus removing the escape characters.
so what options are there to using eval to get the json prepared to parse? I really hate the prototype manual. I would prefer not to use prototype, but my home-brew ajax methods were not cutting it.