Skip to content
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

Ensure download urls are encoded correctly in visits log #15924

Closed
tsteur opened this issue May 7, 2020 · 5 comments · Fixed by #19400
Closed

Ensure download urls are encoded correctly in visits log #15924

tsteur opened this issue May 7, 2020 · 5 comments · Fixed by #19400
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented May 7, 2020

Reported in https://wordpress.org/support/topic/some-minor-ui-tips/#post-12794720

You can reproduce it eg using this HTML

<a target="_blank"  href="https://foo.bar/wp-content/plugins/test.php?api_user_id=123455&dlkey=49849494&content_type=application/pdf">PDF</a>
or 
<a target="_blank"  href="https://foo.bar/wp-content/plugins/test.php?api_user_id=123455&amp;dlkey=49849494&amp;content_type=application/pdf">PDF</a>

resulting in a false link in visitor log (reports itself seem to be fine)

https://foo.bar/wp-content/plugins/test.php?api_user_id=123455&amp;dlkey=49849494&amp;content_type=application/pdf

instead of

https://foo.bar/wp-content/plugins/test.php?api_user_id=123455&dlkey=49849494&content_type=application/pdf

Quick test shows the tracker might send the correct value, but might be some escaping issue.

@tsteur tsteur added the Bug For errors / faults / flaws / inconsistencies etc. label May 7, 2020
@tsteur tsteur changed the title Download/Outlinks not working when they contain HTML entities Download/Outlinks not working when link contains & May 7, 2020
@tsteur tsteur changed the title Download/Outlinks not working when link contains & Download/Outlinks not shown correctly when link contains & May 7, 2020
@tsteur tsteur added the Regression Indicates a feature used to work in a certain way but it no longer does even though it should. label May 7, 2020
@mattab
Copy link
Member

mattab commented May 7, 2020

Maybe duplicate of #11806 ?

@tsteur
Copy link
Member Author

tsteur commented May 7, 2020

It's not related to any segmenting or so.

@tsteur tsteur added this to the 4.4.0 milestone Apr 5, 2021
@tsteur
Copy link
Member Author

tsteur commented Apr 5, 2021

there's more insights here https://wordpress.org/support/topic/some-user-facing-logs-have-a-url-encoding-issue-for-ampersands-in-links/

Basically, it seems to work in Downloads reports but not in Visits log and real time widget meaning it is likely indeed an escaping issue.

@tsteur
Copy link
Member Author

tsteur commented Jul 22, 2021

This might be fixed meanwhile. Need to first reproduce it before looking into it.

@sgiehl
Copy link
Member

sgiehl commented Jun 24, 2022

I'm actually not able to reproduce the tracking issue. If I have a page with the links mentioned in the issue description, both are tracked with the same url. Maybe the browser already removes the encoded ampersands.
Nevertheless: If I manually trigger tracking a download with an encoded url like:

_paq.push(['trackLink', 'https://foo.bar/wp-content/plugins/test.php?api_user_id=132&amp;dlkey=132&amp;content_type=application/pdf', 'download']);

That url is displayed encoded in the visitor log, while it works when it's tracked as outlink. Will check why that is the case...

@sgiehl sgiehl self-assigned this Jun 24, 2022
@justinvelluppillai justinvelluppillai changed the title Download/Outlinks not shown correctly when link contains & Ensure download urls are encoded correctly in visits log Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants