From 6a6ad370263156af37a6f7102ca2df1193020891 Mon Sep 17 00:00:00 2001 From: Nick Barrett Date: Mon, 13 Dec 2021 11:31:55 +0100 Subject: [PATCH] Ensure we load meta files with utf8 encoding. --- kanmail/server/views/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kanmail/server/views/__init__.py b/kanmail/server/views/__init__.py index 244aecfa..0f976197 100644 --- a/kanmail/server/views/__init__.py +++ b/kanmail/server/views/__init__.py @@ -124,7 +124,7 @@ def get_meta_file(filename): if not path.exists(file_path): abort(404, 'This file does not exist!') - with open(file_path, 'r') as f: + with open(file_path, 'r', encoding='utf-8') as f: file_data = f.read() file_data = markdownify(file_data, linkify=False)