Re: quotes and backslashes

From: Date: Wed, 12 Feb 2003 08:59:44 +0000
Subject: Re: quotes and backslashes
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-18478@lists.php.net to get a copy of this message
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

« previous php.windows (#18478) next »