diff --git a/web/src/typeahead_helper.ts b/web/src/typeahead_helper.ts index 86fad92420..cd78c6f8c0 100644 --- a/web/src/typeahead_helper.ts +++ b/web/src/typeahead_helper.ts @@ -43,9 +43,9 @@ export function build_highlight_regex(query: string): RegExp { } export function highlight_with_escaping_and_regex(regex: RegExp, item: string): string { - // if regex is empty return entire item highlighted and escaped + // if regex is empty return entire item escaped if (regex.source === "()") { - return "" + Handlebars.Utils.escapeExpression(item) + ""; + return Handlebars.Utils.escapeExpression(item); } // We need to assemble this manually (as opposed to doing 'join') because we need to