X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/e67fee0ec88f99401f5add011bf801ec10181e37..93d25ebdd6f8d3b7755f09ca868f70943e98dd1c:/src/librarian/elements/figures/ilustr.py?ds=sidebyside diff --git a/src/librarian/elements/figures/ilustr.py b/src/librarian/elements/figures/ilustr.py index c6105f4..9b3b165 100644 --- a/src/librarian/elements/figures/ilustr.py +++ b/src/librarian/elements/figures/ilustr.py @@ -4,6 +4,8 @@ from ..base import WLElement class Ilustr(WLElement): + SHOULD_HAVE_ID = True + EPUB_TAG = HTML_TAG = 'img' def get_html_attr(self, builder): @@ -43,8 +45,8 @@ class Ilustr(WLElement): return { 'src': file_name, - 'alt': self.attrib['alt'], - 'title': self.attrib['alt'], + 'alt': self.attrib.get('alt', ''), + 'title': self.attrib.get('alt', ''), } get_epub_attr = get_html_attr