From 86f541e6dbfc00b617c822516262da790d58492f Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Fri, 11 May 2012 18:10:23 +0200 Subject: [PATCH] Revert "Web: Fix unicode problems for titleSnarfer." This reverts commit 3579701d2d0461ea9532201f0cb25937e1728c56. --- plugins/Web/plugin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/Web/plugin.py b/plugins/Web/plugin.py index 531ba6695..ae11d771b 100644 --- a/plugins/Web/plugin.py +++ b/plugins/Web/plugin.py @@ -97,13 +97,13 @@ class Web(callbacks.PluginRegexp): return parser = Title() try: - parser.feed(text.decode('utf-8')) + parser.feed(text) except HTMLParser.HTMLParseError: self.log.debug('Encountered a problem parsing %u. Title may ' 'already be set, though', url) if parser.title: domain = utils.web.getDomain(url) - title = utils.web.htmlToText(parser.title.strip().encode('utf-8')) + title = utils.web.htmlToText(parser.title.strip()) s = format(_('Title: %s (at %s)'), title, domain) irc.reply(s, prefixNick=False) titleSnarfer = urlSnarfer(titleSnarfer) @@ -178,12 +178,12 @@ class Web(callbacks.PluginRegexp): text = utils.web.getUrl(url, size=size) parser = Title() try: - parser.feed(text.decode('utf-8')) + parser.feed(text) except HTMLParser.HTMLParseError: self.log.debug('Encountered a problem parsing %u. Title may ' 'already be set, though', url) if parser.title: - irc.reply(utils.web.htmlToText(parser.title.strip().encode('utf-8'))) + irc.reply(utils.web.htmlToText(parser.title.strip())) elif len(text) < size: irc.reply(_('That URL appears to have no HTML title.')) else: