Keep the idiotic epubcheck happy.

This commit is contained in:
Kovid Goyal 2013-06-14 07:46:38 +05:30
parent 9250cc4a0d
commit bc0c8df175
2 changed files with 4 additions and 6 deletions

View File

@ -134,8 +134,7 @@ class Images(object):
if rid in self.rid_map:
src = self.generate_filename(rid, name)
img = IMG(src='images/%s' % src)
if alt:
img.set('alt', alt)
img.set('alt', alt or 'Image')
return img
def drawing_to_html(self, drawing, page):
@ -167,8 +166,7 @@ class Images(object):
src = self.generate_filename(rid)
img = IMG(src='images/%s' % src, style="display:block")
alt = get(imagedata, 'o:title')
if alt:
img.set('alt', alt)
img.set('alt', alt or 'Image')
yield img
def get_float_properties(self, anchor, style, page):

View File

@ -420,9 +420,9 @@ class Convert(object):
if anchor and anchor in self.anchor_map:
span.set('href', '#' + self.anchor_map[anchor])
continue
self.log.warn('Hyperlink with unknown target (%s, %s), ignoring' %
self.log.warn('Hyperlink with unknown target (rid=%s, anchor=%s), ignoring' %
(rid, anchor))
span.set('href', '#')
# span.set('href', '#')
def convert_run(self, run):
ans = SPAN()