Repository navigation
Conversation
The URL metadata of a report row is based on tracked data and can use any scheme, so it is now filtered through UrlHelper::isLookLikeSafeUrl() before it becomes part of the treemap data, checked again in the browser, and opened without giving the new window access to the opener document.
lachiebol
reviewed
Sep 1, 2026
lachiebol
left a comment
Contributor
There was a problem hiding this comment.
One comment, is a fallback needed? Otherwise LGTM
window.vueSanitizeUrl was added in Matomo 5.11 while the plugin supports Matomo 5.0 and later, so the check in the browser is now only applied when the helper exists. The URL is filtered server side in any case.
snake14
added a commit
that referenced
this pull request
Sep 3, 2026
* Improvements in treemap node URL handling, AS-706 (#102) The URL metadata of a report row is based on tracked data and can use any scheme, so it is filtered through UrlHelper::isLookLikeSafeUrl() before it becomes part of the treemap data, checked again in the browser, and opened without giving the new window access to the opener document. The 5.x guard around window.vueSanitizeUrl is dropped here, since every Matomo this branch supports ships the helper. (cherry picked from commit a2eddfb) * Keep rows without a URL free of the link icon A blank url metadata passes isLookLikeSafeUrl() and picks up the http:// prefix, so a row such as "Page URL not defined" gains a link icon that opens the bare scheme. The same fix is still owed on 5.x-dev. * Release the treemap node URL handling as 6.0.1 --------- Co-authored-by: Altamash Shaikh <altamash@innocraft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Improvements in treemap node URL handling
Issue No
AS-706
Steps to Replicate the Issue
Checklist