mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°3565 - Migrate backoffice pages to new UIBlock system : Setup
This commit is contained in:
@@ -130,9 +130,9 @@ class Extension
|
||||
}));
|
||||
|
||||
// Filter to sanitize a string (escape ')
|
||||
// Usage in twig: {{ 'string'|escape_quotes }}
|
||||
// Usage in twig: {{ 'string'|escape_for_js_string }}
|
||||
$oTwigEnv->addFilter(new Twig_SimpleFilter('escape_for_js_string', function ($sString) {
|
||||
return str_replace(["'", "\n"], ["\\'", " "], $sString);
|
||||
return str_replace(["\n"], [" "], htmlentities($sString, ENT_QUOTES, 'UTF-8'));
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user