mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
MOBI Input: Strip geographic tags from converted MOBI markup as ADE doesn't handle them gracefully.
This commit is contained in:
commit
f16fe3e8e6
@ -11,7 +11,7 @@ def devices():
|
||||
from calibre.devices.prs700.driver import PRS700
|
||||
from calibre.devices.cybookg3.driver import CYBOOKG3
|
||||
from calibre.devices.kindle.driver import KINDLE
|
||||
return (PRS500, PRS505, PRS700, CYBOOKG3)
|
||||
return (PRS500, PRS505, PRS700, CYBOOKG3, KINDLE)
|
||||
|
||||
import time
|
||||
|
||||
|
@ -267,6 +267,12 @@ class MobiReader(object):
|
||||
'xx-large' : '6',
|
||||
}
|
||||
for tag in root.iter(etree.Element):
|
||||
if tag.tag in ('country-region', 'place', 'placetype', 'placename',
|
||||
'state', 'city'):
|
||||
tag.tag = 'span'
|
||||
for key in tag.attrib.keys():
|
||||
tag.attrib.pop(key)
|
||||
continue
|
||||
styles, attrib = [], tag.attrib
|
||||
if attrib.has_key('style'):
|
||||
style = attrib.pop('style').strip()
|
||||
|
Loading…
x
Reference in New Issue
Block a user