Reporting API returns invalid JSON when label has backslash character #14882
Labels
Bug
For errors / faults / flaws / inconsistencies etc.
Can't reproduce (yet)
For issues that are reported by several people, but can't be reproduced reliably and need more data
Potential Bug
Something that might be a bug, but needs validation and confirmation it can be reproduced.
Milestone
When using Reporting API and i.a. Actions.getPageUrls report it returns JSON data which can be invalid if the label field has backslash. The backslash is correctly encoded to %5C in url and pageUrl elements but not in label. Matomo version 3.11.0.
e.g.
{"label":"\/search?p=0&q=\&sl=false","nb_visits":17,"nb_hits":17,"sum_time_spent":32,"nb_hits_with_time_generation":17,"min_time_generation":"0.244","max_time_generation":"0.549","sum_daily_nb_uniq_visitors":17,"avg_time_on_page":2,"bounce_rate":"0%","exit_rate":"0%","avg_time_generation":0.407,"url":"https:\/\/example.com\/search?p=0&q=%5C&sl=false","segment":"pageUrl==https%3A%2F%2Fexample.com%search%3Fp%3D0%26q%3D%5C%26sl%3Dfalse"}
The text was updated successfully, but these errors were encountered: