In my symfony page there is a group of checkboxes, so they have the same name :
<input type="checkbox" name="opt[]" value="1"> Option 1
<input type="checkbox" name="opt[]" value="2"> Option 2
...
I check only one box and submit, the URL in the browser looks like this: http://localhost/list?opt[]=1
In my twig I have this instruction :
<link rel="canonical" href="{{ app.request.uri }}">
In the HTML source code I have this :
<link rel="canonical" href="https://localhost/list?opt%5B0%5D=1">
And now the browser says the canonical URL is different from the current one !
How can I prevent twig to encode square brackets ? And why is he adding a 0 betwen them ??
Regards