Special characters in the URI? |
[eluser]ryeguy[/eluser]
Is there a way to encode special characters in the URI without enabling them all in the config? I tried using urlencode(), but the percent signs mess everything up and for some reason the server spits out: Code: Bad Request I guess a solution would be to step through the string before it is put in the uri and encode the special characters myself. I could look at each char, see if it is a special character, and if it is, replace it with _asc(character)_. That would be ugly, increase the length of my uri, and it makes me feel dirty. Please don't make me do this.
[eluser]JoostV[/eluser]
CI has a function url_title(), in the uri helper that does this for you. Code: $dirty_uri = 'This IS %% a ?>:freaky uri'; http://ellislab.com/codeigniter/user-gui...elper.html |
Welcome Guest, Not a member yet? Register Sign In |