mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #184
This commit is contained in:
parent
e7f96c2ee0
commit
072852e031
@ -1186,6 +1186,8 @@ class BeautifulStoneSoup(Tag, SGMLParser):
|
||||
"Handle character references as data."
|
||||
if self.convertEntities in [self.HTML_ENTITIES,
|
||||
self.XML_ENTITIES]:
|
||||
if ref.lower().startswith('x'): # Added by Kovid
|
||||
ref = int(ref[1:], 16)
|
||||
data = unichr(int(ref))
|
||||
else:
|
||||
data = '&#%s;' % ref
|
||||
|
Loading…
x
Reference in New Issue
Block a user