From d16ef6d011c2c78e2907a13dd7ba4c17b5b954e7 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 26 Oct 2021 15:00:39 -0600 Subject: [PATCH] Unescape search response before rendering template Fixes a small issue with the previous commit where bolded search terms had the tags escaped, rather than being applied as actual html. --- app/routes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/routes.py b/app/routes.py index 56256ed..406207c 100644 --- a/app/routes.py +++ b/app/routes.py @@ -1,5 +1,6 @@ import argparse import base64 +import html import io import json import pickle @@ -273,7 +274,7 @@ def search(): is_translation=any( _ in query.lower() for _ in [translation['translate'], 'translate'] ) and not search_util.search_type, # Standard search queries only - response=response, + response=html.unescape(str(response)), version_number=app.config['VERSION_NUMBER'], search_header=(render_template( 'header.html',