Tweaked imports
This commit is contained in:
parent
ba65e889f6
commit
6ec262da3d
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Reference in a new issue