note 48316 added to function.urlencode
| From: | phpguy at paladin-pc dot com | Date: | Sun, 19 Dec 2004 03:07:20 +0000 |
| Subject: | note 48316 added to function.urlencode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-82007@lists.php.net to get a copy of this message | ||
I think elqabbany missed the point of wrapping urlencode inside htmlentities. When you replace the
$str in his code with something a little more likely to be on the query string of a URL, it makes
more sense. Try running his same test using:
$str="x=1&y=2";
You will see that it is the ampersand symbol itself that "breaks" the test.
----
Manual Page -- http://www.php.net/manual/en/function.urlencode.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+48316
Delete -- http://master.php.net/manage/user-notes.php?action=delete+48316&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48316&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48316&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48316&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48316&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48316&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+48316&report=yes
Search -- http://master.php.net/manage/user-notes.php