From 2eee7c1855b075fa004f8086861a10b704875376 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Wed, 9 May 2018 13:46:24 -0400 Subject: [PATCH] Do not escape HTML translations. --- module/VuFind/src/VuFind/View/Helper/Root/JsTranslations.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/VuFind/src/VuFind/View/Helper/Root/JsTranslations.php b/module/VuFind/src/VuFind/View/Helper/Root/JsTranslations.php index 8917346f436..51956abd022 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/JsTranslations.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/JsTranslations.php @@ -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) . '"'; } -- GitLab