mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
EPUB Output: Remove name attribute from <a> tags to keep the asinine epubcheck happy
This commit is contained in:
parent
3ef9a2009f
commit
b12cd7ab03
@ -379,6 +379,9 @@ class EPUBOutput(OutputFormatPlugin):
|
||||
for x in XPath('//h:a[@name]')(body):
|
||||
if not x.get('id', False):
|
||||
x.set('id', x.get('name'))
|
||||
# The delightful epubcheck has started complaining about <a> tags that
|
||||
# have name attributes.
|
||||
x.attrib.pop('name')
|
||||
|
||||
# Replace <br> that are children of <body> as ADE doesn't handle them
|
||||
for br in XPath('./h:br')(body):
|
||||
|
Loading…
x
Reference in New Issue
Block a user