Reputation: 1876
I'm trying to espace these characters in twig: ↑
, ↓
, \/
and /\
.
I tried:
{{ '↑' }}
and
{% raw %}
↑
{% endraw %}
But symfony always complaint about &
, \
, #
characters.
I also tried the following with not success: How to escape Twig delimiters in a Twig template?
Upvotes: 6
Views: 19688
Reputation: 15609
You can do this:
{{ '↑' | escape }}
e
is also used as an alias of escape
, meaning
{{ '↑' | e }}
will also work.
Twig documentation on 'escape'.
Upvotes: 12