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