mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix bug #7745: PML output should ignore external links as it is not support by the spec. Fix part of bug #7742: PML output extra % sign.
This commit is contained in:
parent
acac5a479b
commit
37cde21c6d
@ -216,7 +216,7 @@ class PMLMLizer(object):
|
|||||||
w = '\\w'
|
w = '\\w'
|
||||||
width = elem.get('width')
|
width = elem.get('width')
|
||||||
if width:
|
if width:
|
||||||
w += '="%s%%"' % width
|
w += '="%s"' % width
|
||||||
else:
|
else:
|
||||||
w += '="50%"'
|
w += '="50%"'
|
||||||
text.append(w)
|
text.append(w)
|
||||||
@ -252,8 +252,8 @@ class PMLMLizer(object):
|
|||||||
if href not in self.link_hrefs.keys():
|
if href not in self.link_hrefs.keys():
|
||||||
self.link_hrefs[href] = 'calibre_link-%s' % len(self.link_hrefs.keys())
|
self.link_hrefs[href] = 'calibre_link-%s' % len(self.link_hrefs.keys())
|
||||||
href = '#%s' % self.link_hrefs[href]
|
href = '#%s' % self.link_hrefs[href]
|
||||||
text.append('\\q="%s"' % href)
|
text.append('\\q="%s"' % href)
|
||||||
tags.append('q')
|
tags.append('q')
|
||||||
|
|
||||||
# Anchor ids
|
# Anchor ids
|
||||||
id_name = elem.get('id')
|
id_name = elem.get('id')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user