Validation error with epubcheck

Jan Ulrich Hasecke avatarJan Ulrich Hasecke created an issue

If you insert an image like this:

.. image:: images/Eye_of_Horus.*
      :width: 20%
      :align: center

You get this html:

<a class="reference internal image-reference" href="_images/Eye_of_Horus.svg"><div align="center" class="align-center"><img src="_images/Eye_of_Horus.svg" width="20%" /></div>
</a>

Which does not validate against epubcheck:

Validating against EPUB version 2.0
ERROR: /home/juh/Projekte/Literatur/sphinx-handbuch/_build/epub/Sphinx.epub/abbildungen.html(60,120): element "div" not allowed here; expected the element end-tag, text or element "a", "abbr", "acronym", "applet", "b", "bdo", "big", "br", "cite", "code", "del", "dfn", "em", "i", "iframe", "img", "ins", "kbd", "map", "noscript", "ns:svg", "object", "q", "samp", "script", "small", "span", "strong", "sub", "sup", "tt" or "var" (with xmlns:ns="http://www.w3.org/2000/svg")
ERROR: /home/juh/Projekte/Literatur/sphinx-handbuch/_build/epub/Sphinx.epub/abbildungen.html(60,120): attribute "align" not allowed here; expected attribute "class", "dir", "id", "lang", "style", "title" or "xml:lang"
ERROR: /home/juh/Projekte/Literatur/sphinx-handbuch/_build/epub/Sphinx.epub/abbildungen.html(60,170): element "img" missing required attribute "alt"
ERROR: /home/juh/Projekte/Literatur/sphinx-handbuch/_build/epub/Sphinx.epub/abbildungen.html(102,129): element "img" missing required attribute "alt"
ERROR: /home/juh/Projekte/Literatur/sphinx-handbuch/_build/epub/Sphinx.epub/_images/Eye_of_Horus.svg(3,132): value of attribute "version" is invalid; must be equal to "1.1"
ERROR: /home/juh/Projekte/Literatur/sphinx-handbuch/_build/epub/Sphinx.epub/abbildungen.html(60,79): hyperlink to non-standard resource '_images/Eye_of_Horus.svg' of type 'image/svg+xml'
WARNING: /home/juh/Projekte/Literatur/sphinx-handbuch/_build/epub/Sphinx.epub/abbildungen.html(60,79): hyperlink to resource outside spine '_images/Eye_of_Horus.svg'
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.