Reply to 'peter at mailinator dot com'
If you are having problems using urldecode in PHP following the escape() function in Javascript, try to do a decodeURI() before the escape(). This fixed it for me at least.
Thomas
![]() |
|
||||||||||
|
urlencodeDescriptionstring urlencode ( string str )Returns a string in which all non-alphanumeric characters except -_. have been replaced with a percent (%) sign followed by two hex digits and spaces encoded as plus (+) signs. It is encoded the same way that the posted data from a WWW form is encoded, that is the same way as in application/x-www-form-urlencoded media type. This differs from the RFC1738 encoding (see rawurlencode()) in that for historical reasons, spaces are encoded as plus (+) signs. This function is convenient when encoding a string to be used in a query part of a URL, as a convenient way to pass variables to the next page: Note: Be careful about variables that may match HTML entities. Things like &, © and £ are parsed by the browser and the actual entity is used instead of the desired variable name. This is an obvious hassle that the W3C has been telling people about for years. The reference is here: http://www.w3.org/TR/html4/appendix/notes.html#h-B.2.2. PHP supports changing the argument separator to the W3C-suggested semi-colon through the arg_separator .ini directive. Unfortunately most user agents do not send form data in this semi-colon separated format. A more portable way around this is to use & instead of & as the separator. You don't need to change PHP's arg_separator for this. Leave it as &, but simply encode your URLs using htmlentities() or htmlspecialchars().
See also urldecode(), htmlentities(), rawurldecode() and rawurlencode(). urlencode
Thomas
05-Sep-2007 02:30
Reply to 'peter at mailinator dot com'
mmj48.com
07-Aug-2007 08:28
What I use instead:
ahrensberg at gmail dot com
04-Aug-2007 05:04
Like "Benjamin dot Bruno at web dot de" earlier has writen, you can have problems with encode strings with special characters to flash. Benjamin write that:
mensonge
26-Jul-2007 06:29
I had difficulties with all above solutions. So I applied a dirty simple solution by using:
sebastiaan at netomzet dot nl
05-Mar-2007 09:04
quote: "Apache's mod_rewrite and mod_proxy are unable to handle urlencoded URLs properly - http://issues.apache.org/bugzilla/show_bug.cgi?id=34602"
in reply to "kL"
20-Feb-2007 01:23
kL's example is very bugged since it loops itself and the encode function is two-way.
rm<at>mindbench<dot>nl 14-Feb-2007 05:32
Another thing to keep in mind is that urlencode is not unicode. |
| © 2007 info@grandviewstudio.com |
| Z058440144362 Z348613067571 |