Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2020-01-27 02:54:22 +0300
committerThomas Steur <tsteur@users.noreply.github.com>2020-01-27 02:54:22 +0300
commitb5679e1a0ff4e95d55ba8392457505e02909571f (patch)
tree0996b316d12cff7f1c4d2b8e59143ad1266199bd
parentd3aabbd01e87c6de2f6c3cff3f8f3f9a30fa9ae3 (diff)
Ensure named character references without a tailing semicolon won't be replaced in transition urls (#15221)
-rw-r--r--plugins/Actions/javascripts/rowactions.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/Actions/javascripts/rowactions.js b/plugins/Actions/javascripts/rowactions.js
index 422036aecc..71b2be6885 100644
--- a/plugins/Actions/javascripts/rowactions.js
+++ b/plugins/Actions/javascripts/rowactions.js
@@ -23,6 +23,9 @@ $(function () {
tr = getRealRowIfComparisonRow(tr);
var link = tr.find('> td:first > a').attr('href');
+ // replace all &, that are not part of a named character reference with a tailing semicolon, with a &amp;
+ // otherwise named character references without a tailing , (like &reg) would be replaced
+ link = link.replace(/&([a-z]+[^a-z;])/, '&amp;$1');
link = $('<textarea>').html(link).val(); // remove html entities
return link;
}