diff options
-rw-r--r-- | module/plugins/internal/Plugin.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py index 1f86214c4..9b110280e 100644 --- a/module/plugins/internal/Plugin.py +++ b/module/plugins/internal/Plugin.py @@ -2,6 +2,7 @@ from __future__ import with_statement +import inspect import os import re import urllib @@ -260,14 +261,9 @@ class Plugin(object): res = req.load(url, get, post, ref, cookies, just_header, True, bool(decode)) if decode: - res = html_unescape(res) - - if isinstance(decode, basestring): - res = res.decode(decode) + res = html_unescape(res).decode(decode if isinstance(decode, basestring) else 'utf8') if self.core.debug: - import inspect - frame = inspect.currentframe() framefile = fs_join("tmp", self.__name__, "%s_line%s.dump.html" % (frame.f_back.f_code.co_name, frame.f_back.f_lineno)) try: |