mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Web: Fix snarfing of titles with UTF-8 characters.
This commit is contained in:
parent
f9e8c35f01
commit
918092a54d
@ -108,7 +108,10 @@ class Web(callbacks.PluginRegexp):
|
||||
domain = utils.web.getDomain(url)
|
||||
title = utils.web.htmlToText(parser.title.strip())
|
||||
if sys.version_info[0] < 3:
|
||||
title = title.encode('utf8', 'replace')
|
||||
try:
|
||||
title = title.encode('utf8', 'replace')
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
s = format(_('Title: %s (at %s)'), title, domain)
|
||||
irc.reply(s, prefixNick=False)
|
||||
titleSnarfer = urlSnarfer(titleSnarfer)
|
||||
|
Loading…
Reference in New Issue
Block a user