unquote does need utf8, but we need to convert back to unicode after

This commit is contained in:
Damien Elmes 2014-08-05 12:59:31 +09:00
parent 08510a4a53
commit 25c041bc0f

View file

@ -232,7 +232,7 @@ create table meta (dirMod int, lastUsn int); insert into meta values (0, 0);
if re.match("(https?|ftp)://", fname): if re.match("(https?|ftp)://", fname):
return tag return tag
return tag.replace( return tag.replace(
fname, fn(fname.encode("utf-8"))) fname, unicode(fn(fname.encode("utf-8")), "utf8"))
for reg in self.imgRegexps: for reg in self.imgRegexps:
string = re.sub(reg, repl, string) string = re.sub(reg, repl, string)
return string return string