The graphviz extension uses an empty <object ... /> tag to embed svg files, but for the object tag the start and the end tag are required (see http://www.w3.org/TR/html40/struct/objects.html#edef-OBJECT).

Issue #659: https://bitbucket.org/birkenfeld/sphinx/issue/659/patch-graphviz-object-tag-to-embed-svg
This commit is contained in:
Njal Karevoll 2011-08-12 09:15:02 +02:00
parent aa7098ed82
commit 61867d69e7

View File

@ -214,7 +214,7 @@ def get_svg_tag(svgref, svgfile, imgcls=None):
# The object tag works fine on Firefox and WebKit
# Besides it's a hack, this strategy does not mess with templates.
imgcss = imgcls and ' class="%s"' % imgcls or ''
return '<object type="image/svg+xml" data="%s"%s%s/>\n' % \
return '<object type="image/svg+xml" data="%s"%s%s></object>\n' % \
(svgref, imgcss, style)