mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-03 04:14:43 +00:00
Python3: fix unichr() in htmlparser
This commit is contained in:
parent
5179e47c52
commit
8b9f29ae52
1 changed files with 2 additions and 1 deletions
|
|
@ -165,6 +165,7 @@ try:
|
|||
from htmlentitydefs import name2codepoint
|
||||
except ImportError:
|
||||
from html.entities import name2codepoint
|
||||
from builtins import chr
|
||||
|
||||
|
||||
def _resolve_entity (mo):
|
||||
|
|
@ -193,7 +194,7 @@ def _resolve_entity (mo):
|
|||
# unknown entity -> ignore
|
||||
return u''
|
||||
try:
|
||||
return unichr(num)
|
||||
return chr(num)
|
||||
except ValueError:
|
||||
return u''
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue