summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFilipa Lacerda <lacerda.filipa@gmail.com>2017-01-27 20:51:30 +0000
committerDJ Mountney <david@twkie.net>2017-01-31 12:20:31 -0800
commit6d986d14656d04ed1925fffb1029b46a6a3fbc4d (patch)
tree211bc7cbd2ff7016ef13c7713209b7a44e789fe2 /app
parentae43196338318b8ee3df9de7915201b5d6220ed0 (diff)
downloadgitlab-ce-6d986d14656d04ed1925fffb1029b46a6a3fbc4d.tar.gz
Merge branch 'fix-search-bar-search-param' into 'master'
Fix search bar search param encoding Closes #27398 See merge request !8753
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/filtered_search/filtered_search_manager.js.es63
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/filtered_search/filtered_search_manager.js.es6 b/app/assets/javascripts/filtered_search/filtered_search_manager.js.es6
index 8d62324b79f..029564ffc61 100644
--- a/app/assets/javascripts/filtered_search/filtered_search_manager.js.es6
+++ b/app/assets/javascripts/filtered_search/filtered_search_manager.js.es6
@@ -196,7 +196,8 @@
});
if (searchToken) {
- paths.push(`search=${encodeURIComponent(searchToken)}`);
+ const sanitized = searchToken.split(' ').map(t => encodeURIComponent(t)).join('+');
+ paths.push(`search=${sanitized}`);
}
Turbolinks.visit(`?scope=all&utf8=✓&${paths.join('&')}`);