mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Replace non-breaking spaces with spaces.
This commit is contained in:
parent
68e3acd43a
commit
66f7802f9e
@ -153,6 +153,10 @@ class PMLMLizer(object):
|
|||||||
for unused in anchors.difference(links):
|
for unused in anchors.difference(links):
|
||||||
text = text.replace('\\Q="%s"' % unused, '')
|
text = text.replace('\\Q="%s"' % unused, '')
|
||||||
|
|
||||||
|
# Replace bad characters.
|
||||||
|
text = text.replace(u'\xc2', '')
|
||||||
|
text = text.replace(u'\xa0', ' ')
|
||||||
|
|
||||||
# Turn all html entities into unicode. This should not be necessary as
|
# Turn all html entities into unicode. This should not be necessary as
|
||||||
# lxml should have already done this but we want to be sure it happens.
|
# lxml should have already done this but we want to be sure it happens.
|
||||||
for entity in set(re.findall('&.+?;', text)):
|
for entity in set(re.findall('&.+?;', text)):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user