Commit 7564c571 authored by Clement Ho's avatar Clement Ho

Use + instead of %20

parent a257f489
......@@ -70,8 +70,8 @@
const sanitizedKey = key.slice(0, key.indexOf('_'));
inputValue += `${sanitizedKey}:${value} `;
} else if (!match && key === 'search') {
// Sanitize value as URL converts spaces into %20
const sanitizedValue = value.replace('%20', ' ');
// Sanitize value as URL converts spaces into +
const sanitizedValue = value.replace(/[+]/g, ' ');
inputValue += `${sanitizedValue} `;
}
});
......@@ -149,7 +149,6 @@
console.log('search');
let path = '?scope=all&state=opened&utf8=✓';
this.tokens.forEach((token) => {
const param = validTokenKeys.find((t) => {
return t.key === token.key;
......@@ -159,7 +158,7 @@
});
if (this.searchToken) {
path += '&search=' + this.searchToken;
path += '&search=' + this.searchToken.replace(/ /g, '+');
}
window.location = path;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment