79628896

Date: 2025-05-19 14:08:00
Score: 1
Natty:
Report link

In modern Twig you can easily use escape filter.

{{ ' href="%s%s"' | format('/test-route', '#anchor') | escape }}

format will act like sprintf replacing the string

escape will allow you to use whatever character you want.

reference: https://twig.symfony.com/doc/3.x/filters/escape.html

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Wanderson Silva