|
Posted by Toby A Inkster on 12/08/07 13:08
FFMG wrote:
> It all works fine but the ',' is converted to the html '%2C', (I use php
> URLencode, http://php.net/urlencode).
The PHP urlencode() function is a little overcautious. It encodes
virtually any non-alphanumeric character in the URL, even though many
would be perfectly safe to leave unencoded.
If you prefer your commas to be unencoded, then I suggest writing your
own replacement for urlencode. It's not difficult.
If you're using PHP 5.3+ with namespaces, then you can even name your
function "urlencode()" too, so that you don't need to go through all your
files replacing calls to urlencode() with my_urlencode().
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 23:40.]
Sharing Music with Apple iTunes
http://tobyinkster.co.uk/blog/2007/11/28/itunes-sharing/
Navigation:
[Reply to this message]
|