don't escape remote image links

thanks to mark (mhl) for the report
This commit is contained in:
Damien Elmes 2011-02-14 03:13:16 +09:00
parent 88fdaef939
commit e9ec7f3649

View file

@ -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