Allowing % (percentage sign) in URIs |
[eluser]thorie[/eluser]
Hello I'm sending email addresses on the URIs like this: http://mysite.com/confirm/email% 40address.com *Note: There is no space in the URL, but I had to add one in this post on this forum because this code igniter forum will actually convert the "% 40" without a space into an @ symbol. Kind of annoying that on a coding forum, code gets converted rather than displayed literally. The % 40 comes from urlencode() of the @ symbol. In config, I have (the default): $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; And this should accept the % (percentage sign), but it is not. CI tells me that: An Error Was Encountered The URI you submitted has disallowed characters. If I remove the % from the URL, it will load without that error message. Any idea how to accept the % sign? Thanks!
[eluser]pistolPete[/eluser]
The url encoded symbol is converted back to the "normal" symbol, so CI recognizes the request URI as http://mysite.com/confirm/[email protected]. You could try one of the 5 uri_protocol settings or add the @ sign to the permitted_uri_chars. Another approach is encrypting the email-adresses, using e.g. base64. Have a look at http://ellislab.com/forums/viewthread/107741/
[eluser]wiredesignz[/eluser]
You could also try enabling query strings in the config.php configuration settings file. Code: $config['enable_query_strings'] = TRUE; Doing so allowed the % character in the url on my dev server. |
Welcome Guest, Not a member yet? Register Sign In |