mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +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 '
|
irc.error(_('This command is disabled '
|
||||||
'(supybot.plugins.Web.fetch.maximum is set to 0).'),
|
'(supybot.plugins.Web.fetch.maximum is set to 0).'),
|
||||||
Raise=True)
|
Raise=True)
|
||||||
fd = utils.web.getUrlFd(url) \
|
fd = utils.web.getUrlFd(url)
|
||||||
.decode('utf8', errors='replace')
|
irc.reply(fd.read(max).decode('utf8', errors='replace'))
|
||||||
irc.reply(fd.read(max))
|
|
||||||
fetch = wrap(fetch, ['url'])
|
fetch = wrap(fetch, ['url'])
|
||||||
|
|
||||||
Class = Web
|
Class = Web
|
||||||
|
Loading…
Reference in New Issue
Block a user