I need to escape some JS twig-like variables in a twig template, but I couldn't find anything about how to do that.
This variables are used in a js templating plugin that uses the same pattern as twig for variables
tooltipFormat: '<span style="color: {{color}}">●</span> {{offset:names}}: {{value}}',
which is causing the twig rendering to fail
Unexpected token "punctuation" of value ":" ("end of print statement" expected) in "path/to/template.twig" at line 116
Thanks in advance for any help.
{{color}}
twig's or JavaScript's now? - Praveen Kumar Purushothaman