Accept symbols on URL |
[eluser]Kevin_3_57[/eluser]
Hi people, I'm having trouble with allowing some symbols on the url in Ci. As i'm using Facebook PHP Api, I get some symbols on the URL due to the crossdomain receiver. Anyway, the only thing I want is to be able to put characters as { } ? : | " , & on the url, so I modified: Code: $config['permitted_uri_chars'] = ''; So, I tried with this: Code: $config['permitted_uri_chars'] = 'a-z 0-9~%.,&:?{}|=_\-'; But that didn't work either. So, CI guru's, any idea? Thanks in advance!, Kevin.
[eluser]Ener1[/eluser]
Hey kevin, did you put your $config[‘enable_query_strings’] in TRUE? and remember to use \ to escape for example ? Hope it helps
[eluser]Kevin_3_57[/eluser]
Yes, query strings are enabled, I'm sure the problem is with { } symbols. I'm thinking about not using CI for this project cause I can't find a solution ![]() Only "?" or there are other symbols in a-z 0-9~%.,&:?{}|=_\- which needs to be escaped? Thanks very much!
[eluser]Ener1[/eluser]
one more, did you read this? http://junal.wordpress.com/2008/01/20/a-...deigniter/ and this http://www.volkanrivera.com/esp/?p=972 I think you may find some really good examples to go over this problem Once again I hope it helps
[eluser]Kevin_3_57[/eluser]
Yeah! I've already read those pages, the problem is that both work with an Iframe application inside facebook which mine doesn't. The string that Facebook returns once the user logs in is similar to this: http://mysite.com/index.php?session={"session_key":"2.8mtVdtZ7JBcHRIs7HeyJrg__.3600.12761101000-100000005993065", "uid":"100000005993165","expires":1276110000,"secret": "lX1a3ANmg1123QFcgWol_sYgw__","access_token":"102508123939795158|2.8mtVdtZ7JBcHRIs7HeyJrg__.3600.1276110000- 100000005993065|oNsokAurI82jPBJ8loGZv57xBDc.","sig":"6ff986b07jhgc5d5bfa41e139d80513cdaa"}&rsvp;_event,email Thanks! (Edited so it fits screen)
[eluser]Ener1[/eluser]
One more chance try $config['uri_protocol'] = 'QUERY_STRING'; and add the {} scaped like \{ \}
[eluser]Kevin_3_57[/eluser]
With $config[‘uri_protocol’] = ‘QUERY_STRING’; the page just throws "The URI you submitted has disallowed characters". ![]() Thanks for taking the time, seriously. Thanks!
[eluser]Ener1[/eluser]
Sorry I couldn´t help you more the fact is that this characters are reserved in regex { } ? : | and must be escaped some way I find this in other post, you loose nothing trying ![]() " Also note that if you want to escape a \ (backslash) you need to put four backslashes in your permitted_uri_chars parameter like this: $config[‘permitted_uri_chars’] = ‘a-z\s0-9~%.:_\-\’\\\\’; " And no problem, the greatest thing about this community is that maybe other day you take the time to do the same for others, and other day I can be the other ![]() |
Welcome Guest, Not a member yet? Register Sign In |