-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for HTML entity decoding of single quotes in campaigns and csv/xml exports #18170
Conversation
…ail campaign and csv/xml exports
@bx80 Are you still working on that one? Had a quick look, but it didn't seem to work as expected. Feel free to readd the |
@sgiehl I've added an additional commit to fix issue #18190 where outlinks with single quotes are not decoded on the visits log. I've checked both the campaign referrer name and outlinks and they both correctly show the single quotes for me. If it's still not working for you, could you provide a screenshot or the test string used? Then I can try to recreate. Maybe character set is a factor? My test steps for the campaign referrer:
For the outlinks:
Thanks! |
@bx80 How did you track the campaign? I have a local site that simply tracks a page view. Adding Visitor log shows this for the visit: The outlink seems to work correct now. |
@sgiehl That's pretty much how I did my tests, a local test site tracking page views with a campaign url. I've just copied and pasted your example campaign url from the comment above and repeated the test - it still works fine for me. It seems like there is some other factor here. I wonder if it could be database collation / character set dependent? |
My database collation ist actually still latin, but all tables are utf8mb4. But I don't think that should be the issue. |
@sgiehl it'd be good to know if you see any issues left on this needing fixed or what needs to be done to get it merged as well as the useful smaller tips. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that actually works as expected. It took me a while to figure out why it doesn't work for campaigns locally. 🤯 It's actually the MarketingCampaignsReporting plugin that I have active, as it overwrites the campaign in that case. Would you mind checking how to fix that for that plugin as well, and maybe create a pull request there as well? Guess it might need to be added here: https://github.com/matomo-org/plugin-MarketingCampaignsReporting/blob/c7d437e9bf4232b29ec5e1f16dcd21dd457bec7e/VisitorDetails.php#L52
@bx80 be good not to update a submodule to a specific branch without mentioning it. After merging the plugin PR, the submodule would now be broken as the reference doesn't exist anymore. Will update the submodule again and merge the PR if tests are passing afterwards |
failing tests seem to be random failures. Will merge this now 👍 |
Description:
Fixes #14695
Tweaked the campaign referrer name decoding so that HTML entity single quotes are properly rendered when displayed on the visitor log.
Also changed the XML and CSV datatable render to use HTML entity decode with the ENT_QUOTES option instead of the ENT_COMPAT option so that exported data with entity encoded quotes is correctly converted.
Review