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
|
from HTMLParser import HTMLParser
|
||||||
|
import htmlentitydefs
|
||||||
import errno
|
import errno
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ class HTMLStripper(HTMLParser):
|
||||||
|
|
||||||
def handle_entityref(self, name):
|
def handle_entityref(self, name):
|
||||||
try:
|
try:
|
||||||
char = unichr(name2codepoint[name])
|
char = unichr(htmlentitydefs.name2codepoint[name])
|
||||||
except Exception, error:
|
except Exception, error:
|
||||||
char = u'&%s;' % name
|
char = u'&%s;' % name
|
||||||
self._stripped.append(char)
|
self._stripped.append(char)
|
||||||
|
|
Reference in a new issue