RE: [PHP-WIN] quotes and backslashes
| From: | Chris Kranz | Date: | Wed, 12 Feb 2003 09:53:58 +0000 |
| Subject: | RE: [PHP-WIN] quotes and backslashes | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-18480@lists.php.net to get a copy of this message | ||
Checkout the stripslashes() and addslashes() functions. Very cool for
stuff like this, and very easy :)
chris kranz
fatcuban.com
-----Original Message-----
From: Per Lundberg [mailto:per@capio.com]
Sent: 12 February 2003 09:00
To: Bobo Wieland
Cc: php-windows@lists.php.net
Subject: Re: [PHP-WIN] quotes and backslashes
On Wed, 2003-02-12 at 09:35, Bobo Wieland wrote:
> When I have strings like 'Hello "World"' containing quotes and passes
them
> to another page I use: rawurlenecode(html_entity_decode($string,
> ENT_QUOTES)).
>
> And then I use rawurldecode to display them again, getting the string:
> 'Hello \"World\"' ...
>
> Why, and hw do I fix it?
I think your problem is caused by PHP also doing its own encoding of
parameters. This is called 'magic quotes' and is well documented in the
manual if you wish to educate yourself on the subject.
I think it will work straight off if you remove the rawurlencode() or
change the setting of magic_quotes_gpc to off (but be aware that this
can be a HUGE security risk if your code is not well-written).
--
Best regards,
Per Lundberg / Capio ApS
Phone: +46-18-4186040
Fax: +46-18-4186049
Web: http://www.capio.com
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php