Re: newbie - PHP escaping trigger happy
| From: | seungp at gmail dot com | Date: | Tue, 02 Sep 2008 16:36:50 +0000 |
| Subject: | Re: newbie - PHP escaping trigger happy | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-279292@lists.php.net to get a copy of this message | ||
IIRC. That's covered under magic quotes . You should be able to turn that off via a config
switch in php.ini or .htaccess.
-----Original Message-----
From: Govinda <govinda@blisscode.com>
Date: Mon, 1 Sep 2008 20:21:10
To: PHP-General List<php-general@lists.php.net>
Subject: [PHP] newbie - PHP escaping trigger happy
Just a quick Q, which I know has to be in the docs somewhere, but I
haven't come across it yet-
PHP automatically escaping single and double quotes... how to turn it
off?
I.e.-
in a form text input, someone inputs
love's "influence" <grows>
and on the posted page I get:
love\'s \"influence\"
WHen I wrap that with htmlspecialchars , then I get:
love\'s \"influence\" <grows>
What I want is:
love's "influence" <grows>
...in this case anyway. Probably if I understood why PHP was escaping
the quotes, then I likely would want that behavior in those
circumstances it was designed for... but not now, and I don't know
how to turn it off.
Thanks,
-Govinda
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php