summaryrefslogtreecommitdiff
path: root/searx/webutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/webutils.py')
-rw-r--r--searx/webutils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/webutils.py b/searx/webutils.py
index 8be8fcecd..2464a097f 100644
--- a/searx/webutils.py
+++ b/searx/webutils.py
@@ -119,7 +119,10 @@ def highlight_content(content, query):
else:
regex_parts = []
for chunk in query.split():
- if len(chunk) == 1:
+ chunk = chunk.replace('"', '')
+ if len(chunk) == 0:
+ continue
+ elif len(chunk) == 1:
regex_parts.append('\\W+{0}\\W+'.format(re.escape(chunk)))
else:
regex_parts.append('{0}'.format(re.escape(chunk)))