From 5da7ed157de9b34ec17f975a81b8a2912a45a31e Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Thu, 13 Jun 2013 23:57:06 +0200 Subject: url_titles: Use 'replace' as error handling scheme for encoding errors. --- modules/url_titles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/url_titles.py b/modules/url_titles.py index 932e557..966b71b 100644 --- a/modules/url_titles.py +++ b/modules/url_titles.py @@ -107,7 +107,7 @@ class Module: if m: s = m.groups()[0] if enc: - s = s.decode(enc).encode('utf8') + s = s.decode(enc, 'replace').encode('utf8', 'replace') titles.append(s) elif u.headers['content-type'] in ('image/gif', 'image/png', 'image/jpeg'): def pretty_size(size): -- cgit v1.2.3