diff options
author | Holger Voormann | 2021-04-21 18:05:07 +0000 |
---|---|---|
committer | Wim Jongman | 2021-04-21 18:43:30 +0000 |
commit | fa662230840fa92752a6efd6369873571465ea46 (patch) | |
tree | 4b7d2b4f1bfa9ea5dd6a894dd4d090c9e2a882af | |
parent | 592b0249257361dd55763f5352a20fc1da6a7107 (diff) | |
download | eclipse.platform.ua-I20210425-1800.tar.gz eclipse.platform.ua-I20210425-1800.tar.xz eclipse.platform.ua-I20210425-1800.zip |
Bug 571831 - Modernized help UI: in a search link ' ' must not become +I20210428-0330I20210428-0040I20210427-1800I20210426-2110I20210426-1800I20210425-1800I20210424-1800I20210423-1800I20210423-0350I20210423-0140I20210422-1800I20210421-1800
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.js | 2 |
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; } |