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:
authordiosmosis <diosmosis@users.noreply.github.com>2019-11-08 05:19:16 +0300
committerGitHub <noreply@github.com>2019-11-08 05:19:16 +0300
commitd5c9010a9a3a2db3e3564f8e1b92e81215e275c5 (patch)
tree98adbe942ba8912211efaefce82330ad2e06f0c8 /plugins/CoreHome
parent99a60500603a1d0c2d66d722670cd72dc25e9d88 (diff)
Fixes a couple segment handling regressions in the UI (#15110)
* When trying to see whether we should decode a segment, favor encoded segment since it appears to be more common. * Replace existing param in URL if it exists but empty (eg, segment=). * If editing segment during comparison, remove comparison in case edited segment is one being compared. * Solve the problem of matching segments that end up decoded a different way to avoid side effects. * Revert test file change. * Add test for getStoredSegmentName().
Diffstat (limited to 'plugins/CoreHome')
-rw-r--r--plugins/CoreHome/javascripts/broadcast.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/CoreHome/javascripts/broadcast.js b/plugins/CoreHome/javascripts/broadcast.js
index ef1b23ff28..6781e7cfe3 100644
--- a/plugins/CoreHome/javascripts/broadcast.js
+++ b/plugins/CoreHome/javascripts/broadcast.js
@@ -447,7 +447,7 @@ var broadcast = {
return (str+'').replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
};
- if (valFromUrl != '') {
+ if (valFromUrl != '' || urlStr.indexOf(paramName + '=') !== -1) {
// replacing current param=value to newParamValue;
valFromUrl = getQuotedRegex(valFromUrl);
var regToBeReplace = new RegExp(paramName + '=' + valFromUrl, 'ig');