Open Petervw opened 5 years ago
Using the Twig extractor we've had a fatal error on a semi-custom filter.
$twig->addFilter(new Twig_SimpleFilter('addslashes', 'addslashes'));
Our twig template:
<div>{{ content.content|raw|addslashes }}</div>
Problem: We cannot use the default sanitization from Twig, we need the raw string with real HTML characters.
This will result in the following fatal error from the extractor:
PHP Fatal error: Uncaught Twig_Error_Syntax: Unknown "addslashes" filter
Thanks for reporting!
I guess we need to register that extension in https://github.com/umpirsky/Twig-Gettext-Extractor/blob/master/twig-gettext-extractor#L29-L39.
Can you try that locally and tell if it works?
Using the Twig extractor we've had a fatal error on a semi-custom filter.
Our twig template:
Problem: We cannot use the default sanitization from Twig, we need the raw string with real HTML characters.
This will result in the following fatal error from the extractor: