Skip to content
Snippets Groups Projects
Commit 2eee7c18 authored by Demian Katz's avatar Demian Katz
Browse files

Do not escape HTML translations.

parent 07b825f7
No related merge requests found
......@@ -99,6 +99,10 @@ class JsTranslations extends AbstractHelper
$translation = is_array($v)
? call_user_func_array([$this->transEsc, '__invoke'], $v)
: $this->transEsc->__invoke($v);
// Special case: do not escape _html translations:
if (substr($k, -5) === '_html') {
$translation = html_entity_decode($translation);
}
$parts[] = '"' . addslashes($k) . '": "'
. addslashes($translation) . '"';
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment