From c95637eee1890a239842bd8f86b0c413a812ebe7 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Fri, 24 Feb 2017 14:39:20 +0100 Subject: [PATCH] Rev1941, Use utf-8 encoding on text files --- src/Config.py | 2 +- src/Ui/UiRequest.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Config.py b/src/Config.py index dfe79ff1..e4930730 100644 --- a/src/Config.py +++ b/src/Config.py @@ -10,7 +10,7 @@ class Config(object): def __init__(self, argv): self.version = "0.5.2" - self.rev = 1940 + self.rev = 1941 self.argv = argv self.action = None self.config_file = "zeronet.conf" diff --git a/src/Ui/UiRequest.py b/src/Ui/UiRequest.py index ad6d532f..4f6502ae 100644 --- a/src/Ui/UiRequest.py +++ b/src/Ui/UiRequest.py @@ -157,6 +157,9 @@ class UiRequest(object): if content_type == "text/html": content_type = "text/html; charset=utf-8" + if content_type == "text/plain": + content_type = "text/plain; charset=utf-8" + cacheable_type = ( content_type == "text/css" or content_type.startswith("image") or content_type.startswith("video") or self.env["REQUEST_METHOD"] == "OPTIONS" or content_type == "application/javascript"