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:
John Schember 2010-11-30 18:48:21 -05:00
parent acac5a479b
commit 37cde21c6d

View File

@ -216,7 +216,7 @@ class PMLMLizer(object):
w = '\\w'
width = elem.get('width')
if width:
w += '="%s%%"' % width
w += '="%s"' % width
else:
w += '="50%"'
text.append(w)
@ -252,8 +252,8 @@ class PMLMLizer(object):
if href not in self.link_hrefs.keys():
self.link_hrefs[href] = 'calibre_link-%s' % len(self.link_hrefs.keys())
href = '#%s' % self.link_hrefs[href]
text.append('\\q="%s"' % href)
tags.append('q')
text.append('\\q="%s"' % href)
tags.append('q')
# Anchor ids
id_name = elem.get('id')