mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
Drop Python 2 (4/n): SearchQuery.query is a str instead of bytes
This commit is contained in:
@@ -59,7 +59,6 @@ def highlight_content(content, query):
|
||||
if content.find('<') != -1:
|
||||
return content
|
||||
|
||||
query = query.decode()
|
||||
if content.lower().find(query.lower()) > -1:
|
||||
query_regex = '({0})'.format(re.escape(query))
|
||||
content = re.sub(query_regex, '<span class="highlight">\\1</span>',
|
||||
|
||||
Reference in New Issue
Block a user