wkcaj/safecurl

HTTP paths with / in it gets encoded to %2F which breaks the URL

hughdavenport opened this issue · 1 comments

When I tried adding this shortened url for a google map: https://goo.gl/maps/pZTiA
Before patch - worked fine
After patch - get a 404
due to safeCurl changing the url thus:
[originalUrl] => https://goo.gl/maps/pZTiA
[cleanUrl] => https://goo.gl/maps%2FpZTiA
And google not liking the / being turned into %2F

Potentially when rebuilding URL, you could use http_build_url function (http://php.net/manual/en/function.http-build-url.php) which does reverse of parse_url :D