summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorClement Ho <ClemMakesApps@gmail.com>2017-01-06 13:56:34 -0600
committerClement Ho <ClemMakesApps@gmail.com>2017-01-09 16:01:37 -0600
commit0f973c28b7f4852119181b549255308c76924c4e (patch)
treec53a7411f1b8c2ac2fa9b35350efa9f0ab4651dd /app
parentd5dee97becf193627f407815aa4013ea3c0a47a2 (diff)
downloadgitlab-ce-0f973c28b7f4852119181b549255308c76924c4e.tar.gz
Fix specs
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/filtered_search/filtered_search_manager.js.es69
1 files changed, 8 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 d2ea4de18aa..bd3c4240f13 100644
--- a/app/assets/javascripts/filtered_search/filtered_search_manager.js.es6
+++ b/app/assets/javascripts/filtered_search/filtered_search_manager.js.es6
@@ -142,7 +142,14 @@
if (condition) {
tokenPath = condition.url;
} else {
- tokenPath = `${keyParam}=${encodeURIComponent(token.value)}`;
+ let tokenValue = token.value;
+
+ if ((tokenValue[0] === '\'' && tokenValue[tokenValue.length - 1] === '\'') ||
+ (tokenValue[0] === '"' && tokenValue[tokenValue.length - 1] === '"')) {
+ tokenValue = tokenValue.slice(1, tokenValue.length - 1);
+ }
+
+ tokenPath = `${keyParam}=${encodeURIComponent(tokenValue)}`;
}
paths.push(tokenPath);