I'm providing a url_encode() function to replace the current. It had a /*FIX ME*/ comment in it, here it is.
It should be a drop in replacement.
Function is provided in the self-standing program that test one string which was encoded with PHP
to compare the output.
View and moderate all "patches Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Patches"
url_encode replacement for httpfs
View and moderate all "patches Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Patches"
First patch is wrong as it url-encodes the whole URI and it should not. The path should be left as is and not encode '/'s
View and moderate all "patches Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Patches"
Second , updated version of url_encode
View and moderate all "patches Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Patches"
Added a second and updated version of url encode that should handle reserved and unreserved characters better
Thanks for these encode function.
I guess I will need to look up the RFC which specifies what characters should be encoded and make some tests before I replace the strdup with it. Otherwise it might break more URLs than it fixes ;-)