summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2022-01-21 17:12:02 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2022-01-21 17:13:41 +0700
commit252a1b9488d7cd22a4b965d47f9e332607ec5b55 (patch)
tree744d8328ace2795148599d038246a669ab4df448 /src
parent48dfd66cae2811933b195b42d787e36b9e5d9298 (diff)
downloadformbox-252a1b9488d7cd22a4b965d47f9e332607ec5b55.tar.gz
Fix payload rendering
Diffstat (limited to 'src')
-rwxr-xr-x[-rw-r--r--]src/formbox.py4
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