CodeIgniter Forums
Special chars in url - 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: Special chars in url (/showthread.php?tid=30763)



Special chars in url - El Forum - 05-25-2010

[eluser]trumnation[/eluser]
hi, I am trying to send a string to my controller via the url. Before I send it, I encode it to remove special chars, etc. however, the resulting string is full of % signs.

I know % is included in the permitted chars in the config file, but I still am getting the "The URI you submitted has disallowed characters." error. Is there something I am missing here?

Here is an example url:

/mycontroller/submitstr/This+is+a+new+Post+can't+hello!/

Thanks!


Special chars in url - El Forum - 05-25-2010

[eluser]MexiTek[/eluser]
Could it be the ' in that URL? Even if it gets converted to % 27 ? I am not an expert on url encoding, but if % 27 gets translated into an ' before checking the allowed chars it might throw your error.


Special chars in url - El Forum - 05-25-2010

[eluser]WanWizard[/eluser]
Apache decodes the URL before it gets passed on, PHP never sees the '...


Special chars in url - El Forum - 05-25-2010

[eluser]trumnation[/eluser]
ah sorry, I didn't look at the post after I submitted it.. seems the forum decoded that string back into + ' and ! after I submitted it. Yeah my problem is that codeigniter is somehow seeing that string with the %'s in it and not liking it. Should I be using a different approach or something?