Skip to content
Snippets Groups Projects
Commit dd36fa9d authored by Igor Melnikov's avatar Igor Melnikov
Browse files

MAGETWO-54652: Replace usages of deprecated escaper functions

Fixing tests
parent bd48aa93
Branches
No related merge requests found
...@@ -77,12 +77,11 @@ class Ga extends \Magento\Framework\View\Element\Template ...@@ -77,12 +77,11 @@ class Ga extends \Magento\Framework\View\Element\Template
$pageName = trim($this->getPageName()); $pageName = trim($this->getPageName());
$optPageURL = ''; $optPageURL = '';
if ($pageName && substr($pageName, 0, 1) == '/' && strlen($pageName) > 1) { if ($pageName && substr($pageName, 0, 1) == '/' && strlen($pageName) > 1) {
$optPageURL = ", '{$this->escapeJs($pageName)}'"; $optPageURL = ", '" . htmlspecialchars($pageName, ENT_COMPAT, 'UTF-8', false) . "'";
} }
return "\nga('create', '{$this->escapeJs( return "\nga('create', '" . htmlspecialchars($accountId, ENT_COMPAT, 'UTF-8', false)
$accountId . ", 'auto');\nga('send', 'pageview'{$optPageURL});\n";
)}', 'auto');\nga('send', 'pageview'{$optPageURL});\n";
} }
/** /**
......
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