mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
don't escape remote image links
thanks to mark (mhl) for the report
This commit is contained in:
parent
88fdaef939
commit
e9ec7f3649
1 changed files with 6 additions and 3 deletions
|
@ -136,9 +136,12 @@ def stripMedia(txt):
|
|||
|
||||
def escapeImages(string):
|
||||
def repl(match):
|
||||
return match.group(1).replace(
|
||||
match.group(2),
|
||||
urllib.quote(match.group(2).encode("utf-8")))
|
||||
tag = match.group(1)
|
||||
fname = match.group(2)
|
||||
if re.match("(https?|ftp)://", fname):
|
||||
return tag
|
||||
return tag.replace(
|
||||
fname, taglib.quote(fname.encode("utf-8")))
|
||||
return re.sub(regexps[1], repl, string)
|
||||
|
||||
# Rebuilding DB
|
||||
|
|
Loading…
Reference in a new issue