diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2019-07-29 07:20:57 +0300 |
---|---|---|
committer | Thomas Steur <tsteur@users.noreply.github.com> | 2019-07-29 07:20:57 +0300 |
commit | f567986d5bca174615d331c34d235808617a744b (patch) | |
tree | 36e762075a29ab0fc43cdb44b3a271051de3e6da /plugins/Morpheus | |
parent | 521eb11cc27491b3274f585f45ef92e611e40a09 (diff) |
Add new property to store un-encoded site name for use in JS. (#14663)
Diffstat (limited to 'plugins/Morpheus')
-rw-r--r-- | plugins/Morpheus/templates/_jsGlobalVariables.twig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/Morpheus/templates/_jsGlobalVariables.twig b/plugins/Morpheus/templates/_jsGlobalVariables.twig index a02116d62f..2708c1679a 100644 --- a/plugins/Morpheus/templates/_jsGlobalVariables.twig +++ b/plugins/Morpheus/templates/_jsGlobalVariables.twig @@ -20,7 +20,10 @@ {% if idSite is defined %}piwik.idSite = "{{ idSite }}";{% endif %} - {% if siteName is defined %}piwik.siteName = "{{ siteName|e('js') }}";{% endif %} + {% if siteName is defined %} + // NOTE: siteName is currently considered deprecated, use piwik.currentSiteName instead, which will not contain HTML entities + piwik.siteName = "{{ siteName|e('js') }}"; + piwik.currentSiteName = {{ siteNameDecoded|json_encode|raw }};{% endif %} {% if siteMainUrl is defined %}piwik.siteMainUrl = "{{ siteMainUrl|e('js') }}";{% endif %} |