From d7246cbb981a47ac5e6229ec3caa51116a09d7eb Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Wed, 30 Mar 2022 23:53:57 +0100 Subject: [PATCH] UTF-8 failure thing --- core/views/expo.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/views/expo.py b/core/views/expo.py index 0fc86e20f..0ce7cdc63 100644 --- a/core/views/expo.py +++ b/core/views/expo.py @@ -129,7 +129,11 @@ def expowebpage(request, expowebpath, path): with open(os.path.normpath(expowebpath / path), "r") as o: html = o.read() except: - return HttpResponse(default_head + '

UTF-8 Parsing Failure:
Page could not be parsed using UTF-8:
failure detected in expowebpage in views.expo.py

Please edit this :expoweb: page to replace dubious umlauts and £ symbols with correct HTML entities e.g. £;. UTF-8 Parsing Failure:
Page could not be parsed using UTF-8:
failure detected in expowebpage in views.expo.py Please edit this :expoweb: page to replace dubious umlauts and £ symbols with correct HTML entities e.g. &pound;;. ]*)>(.*)<\s*/head\s*>(.*)<\s*body([^>]*)>(.*)<\s*/body\s*>(.*)', html, re.DOTALL + re.IGNORECASE) if m: