From 252a1b9488d7cd22a4b965d47f9e332607ec5b55 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Fri, 21 Jan 2022 17:12:02 +0700 Subject: Fix payload rendering --- src/formbox.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 src/formbox.py diff --git a/src/formbox.py b/src/formbox.py old mode 100644 new mode 100755 index beb9246..2136a0c --- 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 -- cgit 1.4.1