Code

Patch from Tom Davidson to add a check for absref tag before deleting it
authorbryce <bryce@users.sourceforge.net>
Thu, 7 Feb 2008 09:31:39 +0000 (09:31 +0000)
committerbryce <bryce@users.sourceforge.net>
Thu, 7 Feb 2008 09:31:39 +0000 (09:31 +0000)
(Closes LP: #169104)

share/extensions/embedimage.py

index 75400aebbf767f7634dfb2815b80b40d8504fb71..06281a4b03c641444b8ed53e071f562c6dc9dd9a 100644 (file)
@@ -94,7 +94,8 @@ class Embedder(inkex.Effect):
                     embed=False
                 if (embed):
                     node.set(inkex.addNS('href','xlink'), 'data:%s;base64,%s' % (type, base64.encodestring(file)))
-                    del node.attrib[inkex.addNS('absref',u'sodipodi')]
+                    if (absref != None):
+                        del node.attrib[inkex.addNS('absref',u'sodipodi')]
                 else:
                     inkex.debug("%s is not of type image/png, image/jpeg, image/bmp, image/gif or image/x-icon" % path)
             else: