work around broken images when pasting/attaching on linux

This commit is contained in:
Damien Elmes 2013-05-24 10:50:15 +09:00
parent 2be34598fe
commit cc73a3bb42

View File

@ -865,6 +865,8 @@ to a cloze type first, via Edit>Change Note Type."""))
pass
# return a local html link
ext = name.split(".")[-1].lower()
if not isWin and not isMac:
name = urllib.quote(name.encode("utf8"))
if ext in pics:
return '<img src="%s">' % name
else: