From b71ffdd691da71a19e201066f505886b33e7548c Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Mon, 1 Feb 2016 10:48:27 -0500 Subject: [PATCH] Escape keys to match values. --- module/VuFind/src/VuFind/View/Helper/Root/JsTranslations.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/VuFind/src/VuFind/View/Helper/Root/JsTranslations.php b/module/VuFind/src/VuFind/View/Helper/Root/JsTranslations.php index a63e3d81c60..40bfd5e501e 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/JsTranslations.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/JsTranslations.php @@ -98,7 +98,8 @@ class JsTranslations extends AbstractHelper $translation = is_array($v) ? call_user_func_array([$this->transEsc, '__invoke'], $v) : $this->transEsc->__invoke($v); - $parts[] = '"' . $k . '": "' . addslashes($translation) . '"'; + $parts[] = '"' . addslashes($k) . '": "' + . addslashes($translation) . '"'; } return '{' . implode(',', $parts) . '}'; } -- GitLab