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

Fixed encoding.

parent 68133739
No related merge requests found
...@@ -417,6 +417,7 @@ class Piwik extends \Zend\View\Helper\AbstractHelper ...@@ -417,6 +417,7 @@ class Piwik extends \Zend\View\Helper\AbstractHelper
*/ */
protected function getOpeningTrackingCode() protected function getOpeningTrackingCode()
{ {
$escape = $this->getView()->plugin('escapejs');
return <<<EOT return <<<EOT
function initVuFindPiwikTracker{$this->timestamp}(){ function initVuFindPiwikTracker{$this->timestamp}(){
...@@ -424,7 +425,7 @@ function initVuFindPiwikTracker{$this->timestamp}(){ ...@@ -424,7 +425,7 @@ function initVuFindPiwikTracker{$this->timestamp}(){
VuFindPiwikTracker.setSiteId({$this->siteId}); VuFindPiwikTracker.setSiteId({$this->siteId});
VuFindPiwikTracker.setTrackerUrl('{$this->url}piwik.php'); VuFindPiwikTracker.setTrackerUrl('{$this->url}piwik.php');
VuFindPiwikTracker.setCustomUrl('{$this->getCustomUrl()}'); VuFindPiwikTracker.setCustomUrl('{$escape($this->getCustomUrl())}');
EOT; EOT;
} }
...@@ -436,7 +437,7 @@ EOT; ...@@ -436,7 +437,7 @@ EOT;
*/ */
protected function getCustomUrl() protected function getCustomUrl()
{ {
$path = $this->request->getUri()->getPath(); $path = $this->request->getUri()->toString();
$routeMatch = $this->router->match($this->request); $routeMatch = $this->router->match($this->request);
if ($routeMatch if ($routeMatch
&& $routeMatch->getMatchedRouteName() == 'vufindrecord-ajaxtab' && $routeMatch->getMatchedRouteName() == 'vufindrecord-ajaxtab'
......
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