diff options
author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2022-01-21 17:12:02 +0700 |
---|---|---|
committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2022-01-21 17:13:41 +0700 |
commit | 252a1b9488d7cd22a4b965d47f9e332607ec5b55 (patch) | |
tree | 744d8328ace2795148599d038246a669ab4df448 /src | |
parent | 48dfd66cae2811933b195b42d787e36b9e5d9298 (diff) | |
download | formbox-252a1b9488d7cd22a4b965d47f9e332607ec5b55.tar.gz |
Fix payload rendering
Diffstat (limited to 'src')
-rwxr-xr-x[-rw-r--r--] | src/formbox.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/formbox.py b/src/formbox.py index beb9246..2136a0c 100644..100755 --- a/src/formbox.py +++ b/src/formbox.py @@ -39,8 +39,8 @@ def get_body(message): for payload in map(get_body, message.get_payload()): if payload is not None: return payload elif message.get_content_type() in ('text/markdown', 'text/plain'): - return sanitise(linkify(markdown(message.get_payload(decode=True), - output_format='html5'))) + payload = message.get_payload(decode=True).decode() + return sanitise(linkify(markdown(payload, output_format='html5'))) return None |