mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +01:00
Web: Decode _after_ reading the page in @fetch.
This commit is contained in:
parent
653e4dec1b
commit
b5e965c48a
@ -250,9 +250,8 @@ class Web(callbacks.PluginRegexp):
|
||||
irc.error(_('This command is disabled '
|
||||
'(supybot.plugins.Web.fetch.maximum is set to 0).'),
|
||||
Raise=True)
|
||||
fd = utils.web.getUrlFd(url) \
|
||||
.decode('utf8', errors='replace')
|
||||
irc.reply(fd.read(max))
|
||||
fd = utils.web.getUrlFd(url)
|
||||
irc.reply(fd.read(max).decode('utf8', errors='replace'))
|
||||
fetch = wrap(fetch, ['url'])
|
||||
|
||||
Class = Web
|
||||
|
Loading…
Reference in New Issue
Block a user