I am upgrading from Symfony 2.0 to 2.3. We have routes with hashes defined as we have a single page application.
Annotation configured route:
/** * @Route("/app#orders/{id}", name="app_order") */
We use Twig to create email and use these routes in Twig templates:
<a href="{{ url('app_order', { 'id': '123' }) }}">View order</a>
Before the upgrade, everything went fine. After the upgrade, #
gets the encoding to %23
, but the slashes remain untouched. This, of course, generates an invalid URL in the email.
Why only hash encoding and not slashes? It should be all or nothing. What options do I have here besides replacing the string?
Things I've already tried doing that don't help:
- Setting autoescape to false
{% autoescape false %}
- Using raw
{{ url(...)|raw }}
- Using raw and autoescape = false together
source share