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?
You can do this:
{{ '↑' | escape }}
e
is also used as an alias of escape
, meaning
{{ '↑' | e }}
will also work.
Twig documentation on 'escape'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With