mirror of
https://github.com/torproject/lego.git
synced 2024-11-26 19:20:22 +00:00
Fix plugin
This commit is contained in:
parent
16edbaec21
commit
4911d14b48
@ -1,4 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
#pylint: disable=wrong-import-position
|
||||
import sys
|
||||
|
||||
@ -18,7 +18,8 @@ class TxtToHtmlPlugin(Plugin):
|
||||
|
||||
def text(url=None):
|
||||
webFile = request.urlopen(url)
|
||||
content = webFile.read()
|
||||
charset = webFile.info().get_content_charset()
|
||||
content = webFile.read().decode(charset)
|
||||
text ="<pre>" + content + "</pre>"
|
||||
|
||||
return text
|
||||
|
Loading…
Reference in New Issue
Block a user