Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Voormann2021-04-21 18:05:07 +0000
committerWim Jongman2021-04-21 18:43:30 +0000
commitfa662230840fa92752a6efd6369873571465ea46 (patch)
tree4b7d2b4f1bfa9ea5dd6a894dd4d090c9e2a882af
parent592b0249257361dd55763f5352a20fc1da6a7107 (diff)
downloadeclipse.platform.ua-I20210423-0140.tar.gz
eclipse.platform.ua-I20210423-0140.tar.xz
eclipse.platform.ua-I20210423-0140.zip
Avoid accidentally turning spaces (' ') into plus signs ('+') in a search link. For example, if you bookmark the search "Hello world" in Infocenter mode, the bookmark should not trigger the search "Hello+world". Problem: In an URL a space can be coded as ' ', '%20' or '+', but the JavaScript function decodeURIComponent() decodes only '%20' and not '+'. See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent Change-Id: I1a332710869d924cab7076ba7aa667a138c46a5f Signed-off-by: Holger Voormann <eclipse@voormann.de> Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.ua/+/179611 Tested-by: Platform Bot <platform-bot@eclipse.org> Reviewed-by: Wim Jongman <wim.jongman@remainsoftware.com>
-rw-r--r--org.eclipse.help.webapp/m/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.help.webapp/m/index.js b/org.eclipse.help.webapp/m/index.js
index 3edb9034f..34e3c73f2 100644
--- a/org.eclipse.help.webapp/m/index.js
+++ b/org.eclipse.help.webapp/m/index.js
@@ -2681,7 +2681,7 @@
function getParams(queryPart) {
var params = {};
queryPart.replace(/(?:^|&+)([^=&]+)=([^&]*)/gi,
- function(_match, group1Param, group2Value) { params[group1Param] = decodeURIComponent(group2Value); });
+ function(_match, group1Param, group2Value) { params[group1Param] = decodeURIComponent(group2Value.replace(/\+/g, ' ')); });
return params;
}

Back to the top