-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translation escaping #2713
Comments
{{ '<h3>foo</h3>'|trans|raw }} |
I know but that does not resolve the documentation error or the Symfony bug. |
@Tobion I could work on this but I'd rather know which approach should I take:
Thanks! |
|
And the trans tag also works the right way as content outside expressions are never escaped by Twig. This is even documented. It's probably confusing but I'm against changing the current behavior at this point as it would be a major BC break. I discussed that with @weaverryan a long time ago but I don't find the issue right now. |
If I understand this correct, we should change the documentation, saying that |
@wouterj yes |
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
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:
is different from
The text was updated successfully, but these errors were encountered: