![]() |
What to expect from permitted_uri_characters - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: What to expect from permitted_uri_characters (/showthread.php?tid=37553) |
What to expect from permitted_uri_characters - El Forum - 01-13-2011 [eluser]c77m[/eluser] I've read several threads on related issues, and I have a few different ways to "fix" my issue. However, I'd really like to understand *why* I have the issue so I don't cause myself future headaches by making it work like I expect it to. permitted_uri_characters is taken into account when generating URLs (eg. via title_url()), but that has no impact on the parameter string being available to the controller when the URL is loaded. Example controller function: Code: function view($str = NULL) Example view snippet that links to this function: Code: $name = 'john x. doe'; Output from the controller: Quote:str is 'john-x_-doe' My expectation would be that permitted_uri_characters and url_title() would work together to create a link with accessible strings, but it does not. e.g. url_title would generate <b>john-x_-doe</b> or the function paramater would equal <b>john-x.-doe</b>. Fixing this with a custom library is quite simple.. so simple that it makes me think I am missing something. Does a function already exist to produce URL strings that include only readable parameters? What to expect from permitted_uri_characters - El Forum - 01-13-2011 [eluser]Cristian Gilè[/eluser] base64_encode Cristian Gilè What to expect from permitted_uri_characters - El Forum - 01-13-2011 [eluser]c77m[/eluser] [quote author="Cristian Gilè" date="1294960121"]base64_encode[/quote] The data is already utf-8 encoded, which is friendly to the database, filesystem, and webserver. Agreed that I could encode all sorts of undesirable information into the URL, but I prefer to understand how permitted_uri_characters are intended to relate to allowable parameters. |