From 5b8619fb355c8a1d86976b324b3feda381dec8ef Mon Sep 17 00:00:00 2001
From: "egon w. stemle" <github@iiegn.de>
Date: Sat, 18 Feb 2017 12:45:40 +0100
Subject: [PATCH] Fix #11332 (#11333)

Change '//' comment to '/* ... */' to avoid interference with html/js optimisers.
---
 plugins/Morpheus/templates/javascriptCode.twig       |  2 +-
 .../Integration/Tracker/TrackerCodeGeneratorTest.php | 12 ++++++------
 ...tMetadata_year__SitesManager.getJavascriptTag.xml |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/plugins/Morpheus/templates/javascriptCode.twig b/plugins/Morpheus/templates/javascriptCode.twig
index f54bbf1960..8c18b848a7 100644
--- a/plugins/Morpheus/templates/javascriptCode.twig
+++ b/plugins/Morpheus/templates/javascriptCode.twig
@@ -1,7 +1,7 @@
 <!-- Piwik -->
 <script type="text/javascript">
   var _paq = _paq || [];
-  // tracker methods like "setCustomDimension" should be called before "trackPageView"
+  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
 {$options}  _paq.push(['trackPageView']);
   _paq.push(['enableLinkTracking']);
   (function() {
diff --git a/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php b/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php
index f4eb5d799b..30ddbd7cd6 100644
--- a/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php
+++ b/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php
@@ -39,7 +39,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
         $expected = "&lt;!-- Piwik --&gt;
 &lt;script type=&quot;text/javascript&quot;&gt;
   var _paq = _paq || [];
-  // tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot;
+  /* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
   _paq.push([\"setDocumentTitle\", document.domain + \"/\" + document.title]);
   _paq.push([\"setCookieDomain\", \"*.localhost\"]);
   _paq.push([\"setDomains\", [\"*.localhost/piwik\",\"*.another-domain/piwik\",\"*.another-domain/piwik\"]]);
@@ -78,7 +78,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
         $expected = "&lt;!-- Piwik --&gt;
 &lt;script type=&quot;text/javascript&quot;&gt;
   var _paq = _paq || [];
-  // tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot;
+  /* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
   _paq.push(['trackPageView']);
   _paq.push(['enableLinkTracking']);
   (function() {
@@ -116,7 +116,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
         $expected = "&lt;!-- Piwik --&gt;
 &lt;script type=&quot;text/javascript&quot;&gt;
   var _paq = _paq || [];
-  // tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot;
+  /* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
   _paq.push([\"setDocumentTitle\", document.domain + \"/\" + document.title]);
   // you can set up to 5 custom variables for each visitor
   _paq.push([\"setCustomVariable\", 1, \"name\", \"value\", \"visit\"]);
@@ -163,7 +163,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
         $expected = "&lt;!-- Piwik --&gt;
 &lt;script type=&quot;text/javascript&quot;&gt;
   var _paq = _paq || [];
-  // tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot;
+  /* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
   _paq.push([\"setDocumentTitle\", document.domain + \"/\" + document.title]);
   // you can set up to 5 custom variables for each visitor
   _paq.push([\"setCustomVariable\", 1, \"name\", \"value\", \"visit\"]);
@@ -207,7 +207,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
         $expected = "&lt;!-- Piwik --&gt;
 &lt;script type=&quot;text/javascript&quot;&gt;
   var _paq = _paq || [];
-  // tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot;
+  /* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
   _paq.push([\"setDocumentTitle\", document.domain + \"/\" + document.title]);
   _paq.push(['trackPageView']);
   _paq.push(['enableLinkTracking']);
@@ -244,7 +244,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
         $expected = '&lt;!-- Piwik --&gt;
 &lt;script type=&quot;text/javascript&quot;&gt;
   var _paq = _paq || [];
-  // tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot;
+  /* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
   _paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
   // you can set up to 5 custom variables for each visitor
   _paq.push(["setCustomVariable", 1, "abc\"def", "abc\"def", "visit"]);
diff --git a/tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml b/tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml
index d8a851d3c8..6c8629bcf7 100644
--- a/tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml
+++ b/tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml
@@ -2,7 +2,7 @@
 <result>&lt;!-- Piwik --&gt;
 &lt;script type=&quot;text/javascript&quot;&gt;
   var _paq = _paq || [];
-  // tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot;
+  /* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
   _paq.push(['trackPageView']);
   _paq.push(['enableLinkTracking']);
   (function() {
-- 
GitLab