Web: Fix encoding in @title.

This commit is contained in:
Valentin Lorentz 2013-03-06 12:11:46 +00:00
parent f438d0a0c2
commit 9ef83f70cf

View File

@ -187,8 +187,10 @@ class Web(callbacks.PluginRegexp):
""" """
size = conf.supybot.protocols.http.peekSize() size = conf.supybot.protocols.http.peekSize()
text = utils.web.getUrl(url, size=size) text = utils.web.getUrl(url, size=size)
if sys.version_info[0] >= 3: try:
text = text.decode('utf8', 'replace') text = text.decode('utf8', 'replace')
except:
pass
parser = Title() parser = Title()
try: try:
parser.feed(text) parser.feed(text)