Unescape search response before rendering template

Fixes a small issue with the previous commit where bolded search terms
had the <b> tags escaped, rather than being applied as actual html.
main
Ben Busby 2021-10-26 15:00:39 -06:00
parent 2c9cf3ecc6
commit d16ef6d011
No known key found for this signature in database
GPG Key ID: 339B7B7EB5333D14
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import argparse import argparse
import base64 import base64
import html
import io import io
import json import json
import pickle import pickle
@ -273,7 +274,7 @@ def search():
is_translation=any( is_translation=any(
_ in query.lower() for _ in [translation['translate'], 'translate'] _ in query.lower() for _ in [translation['translate'], 'translate']
) and not search_util.search_type, # Standard search queries only ) and not search_util.search_type, # Standard search queries only
response=response, response=html.unescape(str(response)),
version_number=app.config['VERSION_NUMBER'], version_number=app.config['VERSION_NUMBER'],
search_header=(render_template( search_header=(render_template(
'header.html', 'header.html',