diff options
Diffstat (limited to 'sphinx/writers/html.py')
-rw-r--r-- | sphinx/writers/html.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sphinx/writers/html.py b/sphinx/writers/html.py index 99d621c6..17c7d43d 100644 --- a/sphinx/writers/html.py +++ b/sphinx/writers/html.py @@ -336,22 +336,20 @@ class HTMLTranslator(BaseTranslator): if node['uri'].lower().endswith('svg') or \ node['uri'].lower().endswith('svgz'): - atts = {'data': node['uri'], 'type': 'image/svg+xml'} + atts = {'src': node['uri']} if node.has_key('width'): atts['width'] = node['width'] if node.has_key('height'): atts['height'] = node['height'] + if node.has_key('alt'): + atts['alt'] = node['alt'] if node.has_key('align'): self.body.append('<div align="%s" class="align-%s">' % (node['align'], node['align'])) self.context.append('</div>\n') else: self.context.append('') - embatts = atts.copy() - embatts['src'] = embatts.pop('data') - self.body.append(self.starttag(node, 'object', '', **atts)) - self.body.append(self.emptytag(node, 'embed', '', **embatts)) - self.body.append('</object>\n') + self.body.append(self.emptytag(node, 'img', '', **atts)) return if node.has_key('scale'): |