spaces in URLs converted to _ |
[eluser]AtlantixMedia[/eluser]
Hello all, I noticed that CI automatically converts spaces in URLs to _. that is, in an url like this: www.domain.com/main/search/big+city by echoing the 3rd segment or function parameter from within the Search function, I see that it has been converted to big_city. how do I avoid this? thanks in advance
[eluser]Ryuuzaki92[/eluser]
urlencode()? it converts spaces to and other non-alpha chars to its ascii code
[eluser]AtlantixMedia[/eluser]
maybe I didn't make myself clear. this is something that CI does automatically. it converts already urlencoded urls containing spaces (+) to _
[eluser]barbazul[/eluser]
let me tell you that I've done some testing activating and deactivating xss and I haven't come across any scenario where spaces get replaced. what version of CI are you running? could you post some code as to illustrate what you're doing?
[eluser]AtlantixMedia[/eluser]
I'm running ver 1.5.4 http://www.domain.com/main/search/big+city where main is a controller, search is a function, and big+city is a parameter. from within the Search function, I echo the parameter passed by the url and instead of printing big city, it prints big_city. I tried with and without urldecode. same result Code: <?php
[eluser]barbazul[/eluser]
I don't have acces to a web server right now but you should consider upgrading to CI 1.6.1 The tests I've done on 1.6.1 earlier were identical to yours and the spaced weren't replaced
[eluser]AtlantixMedia[/eluser]
ok...I finally upgraded to 1.6.2. Still, I'm experiencing the same issue. spaces are replaced with an _ how can I fix this? thanks
[eluser]AtlantixMedia[/eluser]
any idea? anyone? is it possible php.ini has to do with it?
[eluser]mglinski[/eluser]
not an issue, a feature. If you want spaces add a space in the allowed characters config option in the main config file. -Matt |
Welcome Guest, Not a member yet? Register Sign In |