Re: Problems with quotes in URL - SOLVED - plz FLAME me!!!
| From: | Petre Agenbag | Date: | Wed, 18 Jun 2003 12:49:00 +0000 |
| Subject: | Re: Problems with quotes in URL - SOLVED - plz FLAME me!!! | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151972@lists.php.net to get a copy of this message | ||
Hi lists ( and all the guys trying to help me)
Firstly
SORRY, I oversimplified my examples that I posted in the hope that I
would get to the solution faster.
What i failed to mention in my stupidity, was that I echoed the variable
as the value of a form input text field, so I actually messed up the
HTML, and I just realized it, and a simple $var = htmlspecialchars($var)
does the trick beautifully.
Again
Sorry guys, I really should have known better than to post stripped down
code as the problem is usually a simple thing like this...
Just for the by-and-by, my previous claims to having a "perfectly
working" application before upgrading to 4.3.1 was also then a load of
bull, and I only realized now that my app had this bug in it all the
time!
Just goes to show.
Anyway, I deserve a good flaming for this one!
I'm ready;)
On Wed, 2003-06-18 at 14:39, Chris Hayes wrote:
> (cutted the part about sending a var as get)
>
> >page.php?my_var=whatever+whatever++%5C%22whatever+whatever%5C%22&next_var=blabla
> ok so here the variable is still complete, including slashes and quotes.
>
>
> >And now, on page.php
> >
> >If I do an
> >
> >echo stripslashes($my_var);
> >
> >I get exactly this:
> >
> >whatever whatever \
>
> i get better results with
>
> echo stripslashes(urldecode($_GET['my_var']));
> (or in your version
> echo stripslashes(urldecode($my_var));
> )
>
>
> this even though Marek said "Incomming GET values are urldecoded
> automaticaly, no need to do this." (this=urldecode)
>
>