Bonjour all,
I am creating a form that works as desired, but I wonder whether having the keys starting with a "&" might pose problems at some level (Grav, different browsers/environments…).
The form is redirecting to an url that includes data entered in the form by the visitor through a
name: sort_choice
type: radio
label: 'Sort & filter'
default: markdown
options:
&sort=distance: 'Nearest'
&filter=date_lbl%253D90: 'Date'
(note that the keys start with "&")
and the form action
redirect: 'https://example.com?test={{ form.value.sort_choice|e }}'
I wish the resulting url to be:
https://example.com?test=&sort=distance
but it comes out as:
https://example.com?test=&sort=distance
I also tested escaping the "&" in the Yaml with percent encoding "%26":
options:
%26sort=distance: 'Nearest'
%26filter=date_lbl%253D90: 'Date'
and the url comes out as:
https://example.com?test=%26sort=distance
Both work fine on my local site but it feels weird… Is this safe in all environments to have a "&" in the key?
Tks.
