@@ -1,5 +1,5 @@
1from HTMLParser import HTMLParser
1from HTMLParser import HTMLParser
2−import htmlentitydefs
2+#import htmlentitydefs
4import codecs
4import codecs
5import cStringIO
5import cStringIO
@@ -17,8 +17,9 @@ class HTMLTextExtractor(HTMLParser):
17 self.result.append(unichr(codepoint))
17 self.result.append(unichr(codepoint))
19 def handle_entityref(self, name):
19 def handle_entityref(self, name):
20− codepoint = htmlentitydefs.name2codepoint[name]
20+ #codepoint = htmlentitydefs.name2codepoint[name]
21− self.result.append(unichr(codepoint))
21+ #self.result.append(unichr(codepoint))
22+ self.result.append(name)
23 def get_text(self):
24 def get_text(self):
24 return u''.join(self.result)
25 return u''.join(self.result)