cms
cms copied to clipboard
Collection tag condition with umlauts in get value don't work
Bug description
Found out, that umlauts in a get value, used in the collection tag condition, don't work.
How to reproduce
Pages -> Entry: Title: Über uns (About)
/?q=Über
Neither of them works:
{{ collection:pages title:contains="{get:q}" }}
{{ title }}
{{ /collection:pages }}
{{ collection:pages title:contains="{get}{q}{/get}" }}
{{ title }}
{{ /collection:pages }}
{{ collection:pages title:contains="{get:q|urldecode}" }}
{{ title }}
{{ /collection:pages }}
{{ collection:pages title:contains="{get}{q|urldecode}{/get}" }}
{{ title }}
{{ /collection:pages }}
This works correctly:
{{ collection:pages title:contains="Über" }}
{{ title }}
{{ /collection:pages }}
Logs
No response
Versions
Statamic 3.2.22 Pro Laravel 8.73.0 PHP 8.0.12 No addons installed
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
Maybe related to #4405
In case anyone else is running into this...
The get variables are sanitised and as part of this sanitisation, characters like ü becomes ü. You can see more information about why this is happening in this comment.
In the meantime, I think something like this should work:
{{ collection:pages title:contains="{get:q | decode}" }}
This has been fixed in Statamic 5, which we're hoping to release in the next few days/weeks.