summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5ef6cb9)
raw | patch | inline | side by side (parent: 5ef6cb9)
author | JazzyNico <nicoduf@yahoo.fr> | |
Wed, 16 Dec 2009 20:31:01 +0000 (21:31 +0100) | ||
committer | JazzyNico <nicoduf@yahoo.fr> | |
Wed, 16 Dec 2009 20:31:01 +0000 (21:31 +0100) |
share/extensions/embedimage.py | patch | blob | history | |
share/extensions/inkex.py | patch | blob | history |
index 16439223b9cc79ebbd2127a3088ca4900833c119..f73ceb358dfac505d7bf2462156afba243e616ed 100644 (file)
if xlink is None or xlink[:5] != 'data:':
absref=node.get(inkex.addNS('absref','sodipodi'))
url=urlparse.urlparse(xlink)
- href=urllib.unquote(url.path)
- if os.name == 'nt' and href[0] == '/':
- href = href[1:]
+ href=urllib.url2pathname(url.path)
+
path=''
#path selection strategy:
# 1. href if absolute
if (absref != None):
path=absref
+ path=unicode(path, "utf-8")
+
if (not os.path.isfile(path)):
inkex.errormsg(_('No xlink:href or sodipodi:absref attributes found, or they do not point to an existing file! Unable to embed image.'))
if path:
index d36820692f19de89526d859a615d156d01840b8a..1a70c25d6e9e94bacb0c19e4f991108a677a4b94 100755 (executable)
...
inkex.errormsg(_("This extension requires two selected paths."))
"""
- sys.stderr.write((str(msg) + "\n").encode("UTF-8"))
+ sys.stderr.write((unicode(msg) + "\n").encode("UTF-8"))
def check_inkbool(option, opt, value):
if str(value).capitalize() == 'True':