URL tag improperly escapes ampersands
This one might be trickier to diagnose, so hopefully this helps:
I tried this with encoded queries and unencoded, and the behavior is similar, except the initial results for encoded queries load correctly.
Starting from scratch, the Filters tag produces a list of links generated with URL tag, including an item "Posters & Pull-up Banners" that links to ?search:resource_type=Posters+%26amp+Pull-up+Banners
.
The resulting page has no results and the Filters tag does not recognize "Posters & Pull-up Banners" is in the current search criteria, so it produces a link like ?search:resource_type=Posters+|amp+Pull-up+Banners|Posters+%26amp+Pull-up+Banners
.
I need to modify the original link to ?search:resource_type=Posters+%26+Pull-up+Banners
to get the results to display correctly, though the Filters tag still thinks that item wasn't already selected, and kindly offers a link to ?search:resource_type=Posters+|+Pull-up+Banners|Posters+%26amp+Pull-up+Banners
.
Replies
Low 6 Apr 2014 12:48
This is a tricky issue, due to the nature of multiple values of a field and the optional use of ampersands to split multiple values in a parameter.
Best way around it right, would be either to avoid & in fields like that (and just use the word 'and'), or even use categories instead.
The fix wouldn't be a quick one, so I need to ponder on it a bit.
CNG 6 Apr 2014 12:52
Thanks Low, I just wanted to report it. For this particular case, I am going to replace the ampersand with the word "and", as it's the only such value with an ampersand in all the data I'm working with.
BTW, I was going to consult with you about potentially adding functionality to Low Search to produce an Amazon like filtering system with entry counts under each category (but not "categories.. I mean custom fields) and only showing items greater than one. After much EE frustration (no easy way to count/increment?), I settled on a quick PHP on output solution within the templates. Not ideal, but much easier... hopefully I won't need to rely on PHP on input for anything later... /end rant --}
Low 6 Apr 2014 12:58
As I mentioned before, there really needs to be a core change in EE to allow for that functionality in a more elegant way.
I actually might confer with EllisLab to see if they can add such a change, as I can see that would open up more possibilities on their end, too.