In my symfony2 project, I have some twig temlates. In one of them, I have the block title.
{% block title %}{{ announcement.title }}{% endblock %}
The problem is that the variable {{ announcement.title }}
can be: <em>test</em>
In this case, my title will be <em>test</em>
and it needs to be
test
I have tryied the {% block title %}{{ announcement.title|raw }}{% endblock %}
but nothing changed. This is only in the block title, if I put the raw filter in my block content, then it is fine.
Any idea on how to do that ?
EDIT:
Here is an example:
{% block title %}{{ announcement.title|raw }}{% endblock %}
{% block body_announcements %}{{ announcement.title|raw }}{% endblock %}
In the block title, I see <em>test<em>
and in the block body_announcements I see test which is right.