@utrautmann opened this Issue on July 6th 2022

If a goal has double quotes in its name, then Matomo cannot plot the conversion lines in the Row evolution graph. A javascript error occurs on the console.

Current Behavior to reproduce

  1. Choose a goal with conversions
  2. Rename the goal and insert double quote in the name. F.e. Newsletter "Sport"
  3. Select the goal and go to "Goals by Referrers"
  4. Select any row with a conversion
  5. Open row evolution (see screenshot 1)
  6. Select line with conversion (see screenshot 2)

In step 6 a javascript error will occur and no line will be drawn.

screenshot 1
grafik

screenshot 2
grafik

  • Matomo Version: 4.10.1
  • Browser: Firefox
@bx80 commented on July 7th 2022 Contributor

@utrautmann Thanks for reporting this, the clear steps and screenshots are much appreciated :+1:

I've managed to recreate the issue. It looks like a string escaping bug when passing axis names to jqPlot, when fixing this we should add UI tests for goals containing double and single quotes in their names.

@sgiehl commented on July 7th 2022 Member

That one is another issue with automatically sanitizing input values (See #11786 or #4231). The goals name is stored sanitized. E.g. a " is converted to ". The javascript so holds values that are sanitized. When clicking on a metric in the row evolution, the metric is read using .text() on the clicked element. But as it's a html element, reading text decodes " back to ", causing the values not to match anymore. I'll prepare a PR that workarounds that issue for that special case, but I'm pretty sure something similar might happen again til we get rid of the input sanitizing.

This Issue was closed on July 14th 2022
Powered by GitHub Issue Mirror