httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yehuda Katz <yeh...@ymkatz.net>
Subject Re: [users@httpd] Single quotes in ajax POST data getting prefixed with backslash
Date Mon, 09 Dec 2013 22:30:58 GMT
That is a PHP configuration option called Magic Quotes (
http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-gpc)
that used to be on by default and is now off by default in recent PHP
releases.

- Y

Sent from a gizmo with a very small keyboard and hyperactive autocorrect.
On Dec 9, 2013 4:57 PM, "Tim Streater" <tim@clothears.org.uk> wrote:

> I run an instance of apache under OS X which I use to pass data to PHP
> scripts using ajax. If I have a string such as "O'Toole" (without the
> double-quotes), then when the string (which I pass through
> encodeURIComponent in the browser) arrives in the PHP script, the
> single-quote is prefixed with a backslash. That is, the string above
> becomes "O\'Toole".
>
> I want my app to run under Win7, and I observe that there, the backslash
> is *not* inserted. This difference is a bit irritating, especially as I am
> having trouble discovering which component (browser, apache, PHP) is adding
> the backslash. On the whole, I'd rather not have it, but I'd settle for
> both platforms adding it. Then at least code common to both platforms can
> remove it.
>
> Any guidance as to where to look would be appreciated.
>
> --
> Cheers  --  Tim
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

Mime
View raw message