Welcome Guest, Not a member yet? Register   Sign In
Using & in URL
#1

[eluser]ccachor[/eluser]
I've got a small problem where a query string posting to the URI has a disallowed character in it. The problem is with a specific model car, Town & Country, and I'm posting that to the URL and doing my query based on the URI segment. Is there a quick way to get this to work!?
#2

[eluser]hepp[/eluser]
Simply add it to the allowed characters list.
In your application's config.php change

Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_-';

to

Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_&-';
#3

[eluser]ccachor[/eluser]
That did the trick...I was putting the & all the way at the end in the config file so I was getting an error. Thanks!
#4

[eluser]ejangi[/eluser]
You "could" also (instead) urlencode() the text that's going into the URI...
#5

[eluser]Developer13[/eluser]
[quote author="ucantblamem" date="1199088481"]You "could" also (instead) urlencode() the text that's going into the URI...[/quote]

That's what I would recommend doing. I wouldn't change anything in the allowed characters list unless it was absolutely necessary.




Theme © iAndrew 2016 - Forum software by © MyBB