summaryrefslogtreecommitdiff
path: root/searx/utils.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2016-07-18 22:27:17 +0200
committerGitHub <noreply@github.com>2016-07-18 22:27:17 +0200
commitaa09f963eb8220f866334779f61741da8926fcf2 (patch)
tree37b9c3658374d6b8499be7713c8dc52c66e0be72 /searx/utils.py
parent21c5fb1c4514444a7c4fdecd84874f2b7c367f38 (diff)
parentb3ab221b9808ba2b7b01d417210af9b9527e661c (diff)
Merge pull request #621 from stepshal/anomalous-backslash-in-string
Fix anomalous backslash in string
Diffstat (limited to 'searx/utils.py')
-rw-r--r--searx/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/utils.py b/searx/utils.py
index 219135a4b..c027bff20 100644
--- a/searx/utils.py
+++ b/searx/utils.py
@@ -63,7 +63,7 @@ def highlight_content(content, query):
regex_parts = []
for chunk in query.split():
if len(chunk) == 1:
- regex_parts.append(u'\W+{0}\W+'.format(re.escape(chunk)))
+ regex_parts.append(u'\\W+{0}\\W+'.format(re.escape(chunk)))
else:
regex_parts.append(u'{0}'.format(re.escape(chunk)))
query_regex = u'({0})'.format('|'.join(regex_parts))