CodeIgniter Forums
system/core/URI.php -> rawurldecode, why? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: system/core/URI.php -> rawurldecode, why? (/showthread.php?tid=669)



system/core/URI.php -> rawurldecode, why? - SomeGuy - 01-03-2015

I was attempting to setup a script to track outbound clicks. It requires passing the URI to a controller method. However, I bumped into an issue when URI decided to rawurldecode() (line 209 in CI3).

My question is - is there any reason it's doing this? How often are people passing urlencoded strings to URI? If there is good reason for this, perhaps we can get around it with a config setting or a by passing an argument when URI is initialized in Router::__construct().

I ended up using base64_encode and adding "=" to the list of permitted_uri_chars, but as the warning in config/config.php says, I'm not fully aware of the repercussions of adding "=" to that list...

Any insight would be appreciated. Thanks.


RE: system/core/URI.php -> rawurldecode, why? - SomeGuy - 01-03-2015

Just to clarify, the URL in question was something along the lines of:

http://domain.com/outbound/model/model_id/http%3A%2F%2Fwww.google.com%2F

When routed to my controller method, the 3rd argument was just the "http" as URI was splitting up the segments after it rawurldecoded the request_uri...


RE: system/core/URI.php -> rawurldecode, why? - vivekanandhan - 01-06-2017

free online tool for php urlencode function.. kindly take a look on this..
http://onlinew3tools.com/url-encode