summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--searx/utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/searx/utils.py b/searx/utils.py
index 59d4b85be..ef221ef8e 100644
--- a/searx/utils.py
+++ b/searx/utils.py
@@ -119,6 +119,8 @@ class HTMLTextExtractor(HTMLParser):
def html_to_text(html):
+ html = html.replace('\n', ' ')
+ html = ' '.join(html.split())
s = HTMLTextExtractor()
s.feed(html)
return s.get_text()