mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-03-21 09:41:57 +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:
|
try:
|
||||||
filepath = Path(settings.EXPOWEB) / path
|
filepath = Path(settings.EXPOWEB) / path
|
||||||
o = open(os.path.normpath(filepath).encode(sysdefaultencoding), "r")
|
o = open(os.path.normpath(filepath).encode(sysdefaultencoding), "r", encoding="utf8")
|
||||||
html = o.read(encoding="utf8")
|
html = o.read()
|
||||||
autogeneratedmatch = re.search(r"\<\!--\s*(.*?(Do not edit|It is auto-generated).*?)\s*--\>", html, re.DOTALL + re.IGNORECASE)
|
autogeneratedmatch = re.search(r"\<\!--\s*(.*?(Do not edit|It is auto-generated).*?)\s*--\>", html, re.DOTALL + re.IGNORECASE)
|
||||||
if autogeneratedmatch:
|
if autogeneratedmatch:
|
||||||
return HttpResponse(autogeneratedmatch.group(1))
|
return HttpResponse(autogeneratedmatch.group(1))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user