diff options
| author | asciimoo <asciimoo@gmail.com> | 2013-11-18 16:47:20 +0100 |
|---|---|---|
| committer | asciimoo <asciimoo@gmail.com> | 2013-11-18 16:47:20 +0100 |
| commit | d0427d9baebc5abeb9f09bac54196026e56498b8 (patch) | |
| tree | cc9f1038ea17a47d5c22727090b8dc4f355c88ab /searx/utils.py | |
| parent | ad7c83e3f61885a2919fbc274a3b06edb6feca83 (diff) | |
[fix] html escape
Diffstat (limited to 'searx/utils.py')
| -rw-r--r-- | searx/utils.py | 7 |
1 files changed, 4 insertions, 3 deletions
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) |