forked from Icycoide/searxng
Fix anomalous backslash in string
This commit is contained in:
parent
3fd405dcd3
commit
b3ab221b98
21 changed files with 47 additions and 47 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue