CodeIgniter Forums

Full Version: system/core/URI.php -> rawurldecode, why?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
Just to clarify, the URL in question was something along the lines of:

http://domain.com/outbound/model/model_i...gle.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...
free online tool for php urlencode function.. kindly take a look on this..
http://onlinew3tools.com/url-encode