diff options
author | Stefan Giehl <stefan@piwik.org> | 2017-10-04 23:27:31 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2017-10-04 23:27:31 +0300 |
commit | 557571b23b39e4f087cbddaa7afd5417ae11422a (patch) | |
tree | e37b34f27d52098732631453e49339624c51ebd2 /plugins/Overlay | |
parent | a2e369e10d0cdc314540b5d3e4fe0da08e6cc7c5 (diff) |
force using utf-8 as charset for htmlentities/htmlspecialchars (#12135)
Diffstat (limited to 'plugins/Overlay')
-rw-r--r-- | plugins/Overlay/Controller.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/Overlay/Controller.php b/plugins/Overlay/Controller.php index 6327d34ddf..4ccdcf0b18 100644 --- a/plugins/Overlay/Controller.php +++ b/plugins/Overlay/Controller.php @@ -194,7 +194,7 @@ class Controller extends \Piwik\Plugin\Controller $url = Common::unsanitizeInputValue($url); $message = Piwik::translate('Overlay_RedirectUrlError', array($url, "\n")); - $message = nl2br(htmlentities($message)); + $message = nl2br(htmlentities($message, ENT_COMPAT | ENT_HTML401, 'UTF-8')); $view = new View('@Overlay/showErrorWrongDomain'); $this->addCustomLogoInfo($view); @@ -204,11 +204,11 @@ class Controller extends \Piwik\Plugin\Controller // TODO use $idSite to link to the correct row. This is tricky because the #rowX ids don't match // the site ids when sites have been deleted. $url = 'index.php?module=SitesManager&action=index'; - $troubleshoot = htmlentities(Piwik::translate('Overlay_RedirectUrlErrorAdmin')); + $troubleshoot = htmlentities(Piwik::translate('Overlay_RedirectUrlErrorAdmin'), ENT_COMPAT | ENT_HTML401, 'UTF-8'); $troubleshoot = sprintf($troubleshoot, '<a href="' . $url . '" target="_top">', '</a>'); $view->troubleshoot = $troubleshoot; } else { - $view->troubleshoot = htmlentities(Piwik::translate('Overlay_RedirectUrlErrorUser')); + $view->troubleshoot = htmlentities(Piwik::translate('Overlay_RedirectUrlErrorUser'), ENT_COMPAT | ENT_HTML401, 'UTF-8'); } $this->outputCORSHeaders(); |