If you filter on a field that has a value that includes an ampersand when selecting that value to filter on it does not work.
The output of filter.html for an example
<li>
<a href="?title=Escapade%20-%20Adult%20Kayak%20&%20Snorkel,%20Northwest%20Maui">Escapade - Adult Kayak & Snorkel, Northwest Maui</a></li>
I tried using the urlencode filter, but it encodes the ? as well which causes it to fail also.
<a href="{{ choice.query_string|urlencode }}">{{ choice.display|escape }}</a></li>
If I change the following it works. I know this is not the right place.
In filter.html
change
<a href="{{ choice.query_string }}">{{ choice.display|escape }}</a></li>
to
<a href="{{ choice.query_string|fix_ampersands }}">{{ choice.display|escape }}</a></li>
in html.py
change
def fix_ampersands(value):
"Returns the given HTML with all unencoded ampersands encoded correctly"
return unencoded_ampersands_re.sub('&', value)
to
def fix_ampersands(value):
"Returns the given HTML with all unencoded ampersands encoded correctly"
return unencoded_ampersands_re.sub('%26', value)