Tweaked imports

This commit is contained in:
Luke Rogers 2012-04-19 20:40:16 +12:00
parent ba65e889f6
commit 6ec262da3d

View file

@ -1,5 +1,5 @@
from htmlentitydefs import name2codepoint
from HTMLParser import HTMLParser
import htmlentitydefs
import errno
import re
@ -26,7 +26,7 @@ class HTMLStripper(HTMLParser):
def handle_entityref(self, name):
try:
char = unichr(name2codepoint[name])
char = unichr(htmlentitydefs.name2codepoint[name])
except Exception, error:
char = u'&%s;' % name
self._stripped.append(char)