Index: trunk/extensions/Piwik/Piwik.php |
— | — | @@ -51,6 +51,8 @@ |
52 | 52 | } else { |
53 | 53 | $wgPiwikFinalActionName = $wgPiwikActionName; |
54 | 54 | } |
| 55 | + // Stop xss since page title's can have " and stuff in them. |
| 56 | + $wgPiwikFinalActionName = Xml::encodeJsVar( $wgPiwikFinalActionName ); |
55 | 57 | $funcOutput = <<<PIWIK |
56 | 58 | <!-- Piwik --> |
57 | 59 | <script type="text/javascript"> |
— | — | @@ -63,7 +65,7 @@ |
64 | 66 | /* <![CDATA[ */ |
65 | 67 | try { |
66 | 68 | var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", {$wgPiwikIDSite}); |
67 | | -piwikTracker.setDocumentTitle("{$wgPiwikFinalActionName}"); |
| 69 | +piwikTracker.setDocumentTitle({$wgPiwikFinalActionName}); |
68 | 70 | piwikTracker.setIgnoreClasses("image"); |
69 | 71 | {$wgPiwikCustomJS} |
70 | 72 | piwikTracker.trackPageView(); |