I'm attempting to submit lat|long coordinates from a Low Search form. I've got Low Search configured to use GET variables instead of encoding the query. When I submit the search form the pipe character that delimits my lat|long values is getting converted to "%257C" in the query string.
My Low Search form:
{exp:low_search:form
query="{segment_3}"
form_id="home_search"
}
<input type="hidden" id="distance_from" name="distance:from" value="" />
<input type="search" name="search:organization_name" placeholder="organization name" />
<input type="search" name="keywords" placeholder="keyword" />
<input type="search" id="zipcode" name="zip" placeholder="zipcode" />
<button type="submit">GO</button>
{/exp:low_search:form}
The distance:from field is being populated by AJAX geocoding response, but the same thing happens when I hardcode a string into the distance:from field like this:
<input type="hidden" id="distance_from" name="distance:from" value="30.2966026|-97.9701846" />
The resulting URL looks like:
/search/results/?distance:from=30.2966026%257C-97.9701846&keywords=foo
...and the search results page shows a PHP error:
A PHP Error was encountered
Severity: Notice
Message: Undefined offset: 1
Filename: distance/lsf.distance.php
Line Number: 70
If I manually change "%257C" to "|" in the URL the search results page works properly.
Any suggestions? I've tried adding the pipe character to $config['permitted_uri_chars'] but that has no effect on this issue.
%7C
. A percent sign URL-encoded is%25
. LS doesn't URL-encode the query string itself, so it probably happens somewhere else. If you populate the distance:from parameter manually, does that work? Also, does the same behaviour occur in all browsers, like Chrome, Firefox, IE, etc?