Low Search Double URL Encoding Get Params
Hi Low. I'm getting my low search get parameters url encoded twice.
For example if you go directly here it works fine:
http://52.25.222.91/visit/events/sear...
Or url encoding once work:
http://52.25.222.91/visit/events/sear...
But if you use the form, there is a post and redirect. The redirect params are double encoded:
http://52.25.222.91/visit/events/sear...
I'm trying to use {low_search_date_range_start} to fill the forms dates but it only decodes once and gives me 07%2F10%2F2015
What should I be looking at?
Thanks!
Replies
Low 10 Jul 2015 21:05
Does it work if you don't use GET vars? And does it work if you change the date format to YYYY-MM-DD rather than MM/DD/YYYY?
shennyg 11 Jul 2015 20:24
Thanks for the reply Low.
It does work when I encode the query: http://52.25.222.91/visit/events/sear... (I've since switched it back)
Dashes seem to work too: http://52.25.222.91/visit/events/sear...
Would Low Search be encoding my form submissions or would that be in the EE core?
Low 13 Jul 2015 10:36
LS doesn't explicitly url encode anything. When using GET vars, it uses PHP's http_build_str() to build the query string. My tests show it works as expected, by using a test var with a slash in it -- it doesn't get double encoded.
Have you reproduced this issue in different browsers?
shennyg 13 Jul 2015 19:11
Yes. Chrome, Safari and Firefox. I'm suspecting it's another addon that is causing this issue. I'll update this thread if I get additional info. Thanks for your help!
shennyg 15 Jul 2015 14:38
It ended up being a Apache issue, adding [NE] to the end of the rewrite rule fixed it. Thanks for your support!
Low 15 Jul 2015 15:45
Good to know!