|
Posted by Ivαn Sαnchez Ortega on 07/26/07 20:36
tomb wrote:
> Thank you for such an informative and complete response. You actually
> led me to the real problem and, yes, it is PHP related.
Well, you didn't say that the first time ;-)
> When I capture the actual response from my PHP script, I see all my quote
> marks are escaped with \., which I am doing when I build the response
> string. I didn't think they would still be there when it reached my
> browser. Is there something I can do in my PHP script prior to returning
> the HTML string that will strip those slashes? I tried stripslashed() and
> stripcslashes() but they didn't seem to do anything.
Can I see the PHP code that outputs the HTML+javascript?
> I also tried changing my code to single quotes around the entire string,
> and double quotes only - no slashes - around the element values, but it
> still comes to my browser with the slashes at the double-quotes. ???
Maybe you're just not used to the way PHP handles escape characters inside
single-quoted and double-quoted strings:
In single-quoted strings, *only* the \' and \\ are escaped.
In double-quoted strings, variables are expanded (i.e. replaced with their
values), and \", \n, \t, \\, \$ and some other escape sequences are
escaped, BUT \' is *NOT*.
--
----------------------------------
IvΓ‘n SΓ‘nchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
Un ordenador no es un televisor ni un microondas, es una herramienta
compleja.
Navigation:
[Reply to this message]
|