symfony/symfony — Issue #2713: Translation escaping
Author: Tobion
Created: 2011-11-24 10:43:53+00:00
State: open

I know we discussed this earlier, but I'm still or again confused.
The documentation at http://symfony.com/doc/current/book/translation.html says

{# but static strings are never escaped #}
{{ '

foo

' | trans }}

which is wrong. Because it does get escaped. This is strange because the trans tag does on the other hand not escape.
So we get 2 different results for semantically the same stuff:

{% block title 'Me & you'|trans %}

is different from

{% block title %}
{% trans %}Me & you{% endtrans %}
{% endblock %}