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

Escape keys to match values.

parent 0e73f6a3
No related merge requests found
...@@ -98,7 +98,8 @@ class JsTranslations extends AbstractHelper ...@@ -98,7 +98,8 @@ class JsTranslations extends AbstractHelper
$translation = is_array($v) $translation = is_array($v)
? call_user_func_array([$this->transEsc, '__invoke'], $v) ? call_user_func_array([$this->transEsc, '__invoke'], $v)
: $this->transEsc->__invoke($v); : $this->transEsc->__invoke($v);
$parts[] = '"' . $k . '": "' . addslashes($translation) . '"'; $parts[] = '"' . addslashes($k) . '": "'
. addslashes($translation) . '"';
} }
return '{' . implode(',', $parts) . '}'; return '{' . implode(',', $parts) . '}';
} }
......
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