You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i try to use {{ dump(jsonData|json_encode(constant('JSON_UNESCAPED_SLASHES'))) }} to encode escaped html tags and special characters in my json-string but i'm always getting an error: TwigException: constant function does not exist and is not defined in the context
Also {% autoescape %} does not work: TwigException: Unable to parse 'autoescape'
Any suggestions in how to get twig to encode the json correctly?
The text was updated successfully, but these errors were encountered:
When i try to use
{{ dump(jsonData|json_encode(constant('JSON_UNESCAPED_SLASHES'))) }}
to encode escaped html tags and special characters in my json-string but i'm always getting an error:TwigException: constant function does not exist and is not defined in the context
Also
{% autoescape %}
does not work:TwigException: Unable to parse 'autoescape'
Any suggestions in how to get twig to encode the json correctly?
The text was updated successfully, but these errors were encountered: