2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-01-31 15:32:35 +00:00

utf8 edit pages

This commit is contained in:
Martin Green 2022-06-19 00:54:50 +01:00
parent 18a58c1042
commit 60b2e5e8c7

View File

@ -283,7 +283,7 @@ def editexpopage(request, path):
try:
filepath = Path(settings.EXPOWEB) / path
o = open(filepath, "r")
o = open(filepath.encode(sysdefaultencoding), "r")
html = o.read()
autogeneratedmatch = re.search(r"\<\!--\s*(.*?(Do not edit|It is auto-generated).*?)\s*--\>", html, re.DOTALL + re.IGNORECASE)
if autogeneratedmatch: