Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#2642 closed Bug (fixed)

HTML Validation Errors in Tracking Code

Reported by: jawsmith Owned by:
Priority: low Milestone: 1.6 Piwik 1.6
Component: Documentation Keywords:
Cc: Sensitive: no


The image tracking code currently generated by Piwik (1.5.1) causes HTML Validation Errors ( due to usage of & instead of &. See for details.

Current code:
<!-- Piwik Image Tracker -->
<img src="http://.../piwik.php?idsite=1&rec=1" style="border:0" alt="" />
<!-- End Piwik -->

Should be:
<!-- Piwik Image Tracker -->
<img src="http://.../piwik.php?idsite=1&amp;rec=1" style="border:0" alt="" />
<!-- End Piwik -->

Additional remark: Following forum topic seems to relate to a similar error elsewhere:,75981

Change History (6)

comment:1 Changed 3 years ago by vipsoft (robocoder)

  • Milestone set to 1.6 Piwik 1.6

comment:2 Changed 3 years ago by vipsoft (robocoder)

most browsers can disambiguate the URL, i.e., &rec isn't treated as an entity name because there's no semi-colon.

comment:3 Changed 3 years ago by matt (mattab)

  • Milestone changed from 1.7 Piwik 1.7 to 1.6 Piwik 1.6

comment:4 Changed 3 years ago by matt (mattab)

  • Component changed from Core to Documentation

Actually a documentation issue more than a code issue.

comment:5 Changed 3 years ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

(In [5232]) Fixes #2642 - adding calls to str_replace(&amp)

comment:6 Changed 3 years ago by jawsmith

Re-submitted the issue in the image tracking code as ticket #2733. Unfortunately, the issue in the "Image Tracker code" shown in the web interface is still present in Piwik version 1.6. Despite the fact that "&amp;" is present in DisplayAlternativeTags.tpl.

Note: See TracTickets for help on using tickets.