mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-01-19 09:22:32 +00:00
bug fix to setting encoding
This commit is contained in:
parent
a664e8ce8c
commit
3420422f29
@ -282,8 +282,8 @@ def editexpopage(request, path):
|
||||
|
||||
try:
|
||||
filepath = Path(settings.EXPOWEB) / path
|
||||
o = open(os.path.normpath(filepath).encode(sysdefaultencoding), "r")
|
||||
html = o.read(encoding="utf8")
|
||||
o = open(os.path.normpath(filepath).encode(sysdefaultencoding), "r", encoding="utf8")
|
||||
html = o.read()
|
||||
autogeneratedmatch = re.search(r"\<\!--\s*(.*?(Do not edit|It is auto-generated).*?)\s*--\>", html, re.DOTALL + re.IGNORECASE)
|
||||
if autogeneratedmatch:
|
||||
return HttpResponse(autogeneratedmatch.group(1))
|
||||
|
Loading…
Reference in New Issue
Block a user