note 73366 added to function.urlencode
| From: | inreplyto | Date: | Tue, 20 Feb 2007 09:23:03 +0000 |
| Subject: | note 73366 added to function.urlencode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-123593@lists.php.net to get a copy of this message | ||
kL's example is very bugged since it loops itself and the encode function is two-way.
Why do you replace all %27 through ' in the same string in that you replace all ' through
%27?
Lets say I have a string: Hello %27World%27. It's a nice day.
I get: Hello Hello 'World'. It%27s a nice day.
With other words that solution is pretty useless.
Solution:
Just replace ' through %27 when encoding
Just replace %27 through ' when decoding. Or just use url_decode.
----
Server IP: 217.160.72.57
Probable Submitter: 80.140.94.194 (proxied: unknown)
----
Manual Page -- http://www.php.net/manual/en/function.urlencode.php
Edit -- https://master.php.net/note/edit/73366
Del: integrated -- https://master.php.net/note/delete/73366/integrated
Del: useless -- https://master.php.net/note/delete/73366/useless
Del: bad code -- https://master.php.net/note/delete/73366/bad+code
Del: spam -- https://master.php.net/note/delete/73366/spam
Del: non-english -- https://master.php.net/note/delete/73366/non-english
Del: in docs -- https://master.php.net/note/delete/73366/in+docs
Del: other reasons-- https://master.php.net/note/delete/73366
Reject -- https://master.php.net/note/reject/73366
Search -- https://master.php.net/manage/user-notes.php