Filter with "&" (ampresand) in the value field.

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
Posts: 1
Joined: 08 May 2022, 12:45

Filter with "&" (ampresand) in the value field.

Post by toms »

I have found a tiny problem - in my mantis db, there are few categories, where name contains "&" character ("f0 & f1" - an example).
Everything works fine. Everything but the link (generator) to the filter.

Generated link looks like:

The f0[space][ampersand][space]f1 was parsed like f0[space], then name after ampresand(f1) is treated like next parameter, not a part of the name (that's why there's "=" added after it).
The correct (percent encoding ) link should be :

"f0%20&f1=" vs "f0%20%26%20f1"

(or & intead %26)

Function filter_encode_field_and_value (filter_api.php) calls php urlencode() for each field values. Maybe the value(s) should be processed with htmlspecialcharacters() or similar function first ?

Tomasz Slanina
Posts: 67
Joined: 26 Jul 2010, 14:24

Re: Filter with "&" (ampresand) in the value field.

Post by dregad »

Please file an issue in our bugtracker
Post Reply