Drop Python 2 (4/n): SearchQuery.query is a str instead of bytes

This commit is contained in:
Dalf 2020-08-11 16:25:03 +02:00 committed by Alexandre Flament
parent 7888377743
commit c225db45c8
20 changed files with 48 additions and 48 deletions

View file

@ -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>',