diff --git a/backend/src/schema/resolvers/searches/queryString.js b/backend/src/schema/resolvers/searches/queryString.js index 3f2f70d48f..5ef84cdce2 100644 --- a/backend/src/schema/resolvers/searches/queryString.js +++ b/backend/src/schema/resolvers/searches/queryString.js @@ -40,7 +40,10 @@ const matchBeginningOfWords = (str) => { export function normalizeWhitespace(str) { // delete the first character if it is !, @ or # - return str.replace(/^([!@#])/, '').replace(/\s+/g, ' ').trim() + return str + .replace(/^([!@#])/, '') + .replace(/\s+/g, ' ') + .trim() } export function escapeSpecialCharacters(str) {