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 named character references without a tailing semicolon won't be replaced in transition urls #15221

Merged
merged 1 commit into from Jan 26, 2020

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Dec 2, 2019

I've debugged the issue of #10733 for a while now, and the real issue is here:

function getLinkForTransitionAndOverlayPopover(tr)
{
tr = getRealRowIfComparisonRow(tr);
var link = tr.find('> td:first > a').attr('href');
link = $('<textarea>').html(link).val(); // remove html entities
return link;
}

Decoding the html entities also converts stuff like &reg into ®. That also happens without the tailing ; as various named references don't need it. See https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references

@sgiehl sgiehl added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Dec 2, 2019
@tsteur tsteur modified the milestones: 4.1.0, 4.0.0 Dec 2, 2019
@tsteur tsteur changed the base branch from 3.x-dev to 4.x-dev January 14, 2020 03:58
@tsteur tsteur merged commit b5679e1 into 4.x-dev Jan 26, 2020
@tsteur tsteur deleted the transitionencoding branch January 26, 2020 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants