diff options
author | Stefan Giehl <stefan@matomo.org> | 2020-01-27 02:54:22 +0300 |
---|---|---|
committer | Thomas Steur <tsteur@users.noreply.github.com> | 2020-01-27 02:54:22 +0300 |
commit | b5679e1a0ff4e95d55ba8392457505e02909571f (patch) | |
tree | 0996b316d12cff7f1c4d2b8e59143ad1266199bd /plugins | |
parent | d3aabbd01e87c6de2f6c3cff3f8f3f9a30fa9ae3 (diff) |
Ensure named character references without a tailing semicolon won't be replaced in transition urls (#15221)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Actions/javascripts/rowactions.js | 3 |
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 & + // otherwise named character references without a tailing , (like ®) would be replaced + link = link.replace(/&([a-z]+[^a-z;])/, '&$1'); link = $('<textarea>').html(link).val(); // remove html entities return link; } |