From 0d6180e8a45b5175c533a3cbe07483c5014dc977 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Wed, 1 Nov 2023 17:32:48 +0000 Subject: [PATCH] Add charset=UTF-8 --- cista/app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cista/app.py b/cista/app.py index 6df14c1..bb39b42 100755 --- a/cista/app.py +++ b/cista/app.py @@ -96,6 +96,10 @@ def _load_wwwroot(www): if name in www and www[name][2]["etag"] == etag: wwwnew[name] = www[name] continue + # Add charset definition + if mime.startswith("text/"): + mime = f"{mime}; charset=UTF-8" + # Asset files names will change whenever the content changes cached = name.startswith("assets/") headers = { "etag": etag,