Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[fix] html escape

asciimood0427d9baebc
diff --git a/searx/utils.py b/searx/utils.py
index 8e3b10d39..670499805 100644
--- a/searx/utils.py
+++ b/searx/utils.py
@@ -1,5 +1,5 @@
from HTMLParser import HTMLParser
-import htmlentitydefs
+#import htmlentitydefs
import csv
import codecs
import cStringIO
@@ -17,8 +17,9 @@ class HTMLTextExtractor(HTMLParser):
self.result.append(unichr(codepoint))
def handle_entityref(self, name):
- codepoint = htmlentitydefs.name2codepoint[name]
- self.result.append(unichr(codepoint))
+ #codepoint = htmlentitydefs.name2codepoint[name]
+ #self.result.append(unichr(codepoint))
+ self.result.append(name)
def get_text(self):
return u''.join(self.result)