Damien Elmes 2017-11-17 16:20:33 +10:00
parent 0b3685193d
commit 56444ab967

View File

@ -607,6 +607,8 @@ to a cloze type first, via Edit>Change Note Type."""))
return
finally:
self.mw.progress.finish()
# strip off any query string
url = re.sub("\?.*?$", "", url)
path = urllib.parse.unquote(url)
return self.mw.col.media.writeData(path, filecontents)
@ -645,7 +647,7 @@ to a cloze type first, via Edit>Change Note Type."""))
else:
# in external pastes, download remote media
if self.isURL(src):
fname = self.urlToFile(src)
fname = self._retrieveURL(src)
if fname:
tag['src'] = fname