diff --git a/core/views/expo.py b/core/views/expo.py index 1be813d..e051135 100644 --- a/core/views/expo.py +++ b/core/views/expo.py @@ -87,30 +87,30 @@ def expowebpage(request, expowebpath, path): if not Path(expowebpath / path).is_file(): return render(request, 'pagenotfound.html', {'path': path}) - with open(os.path.normpath(expowebpath / path), "rb") as o: + with open(os.path.normpath(expowebpath / path), "r") as o: html = o.read() - m = re.search(rb'(.*)<\s*head([^>]*)>(.*)<\s*/head\s*>(.*)<\s*body([^>]*)>(.*)<\s*/body\s*>(.*)', html, re.DOTALL + re.IGNORECASE) + m = re.search(r'(.*)<\s*head([^>]*)>(.*)<\s*/head\s*>(.*)<\s*body([^>]*)>(.*)<\s*/body\s*>(.*)', html, re.DOTALL + re.IGNORECASE) if m: preheader, headerattrs, head, postheader, bodyattrs, body, postbody = m.groups() else: - return HttpResponse(default_head + html.decode() + '

HTML Parsing failure:
Page could not be parsed into header and body:
failure detected in expowebpage in views.expo.py

Please edit this :expoweb: page to be in the expected full HTML format (.*)", head, re.DOTALL + re.IGNORECASE) + return HttpResponse(default_head + html + '

HTML Parsing failure:
Page could not be parsed into header and body:
failure detected in expowebpage in views.expo.py

Please edit this :expoweb: page to be in the expected full HTML format (.*)", head, re.DOTALL + re.IGNORECASE) if m: title, = m.groups() else: title = "" - m = re.search(rb"]*)noedit", head, re.DOTALL + re.IGNORECASE) + m = re.search(r"]*)noedit", head, re.DOTALL + re.IGNORECASE) if m: editable = False else: editable = True has_menu = False - menumatch = re.match(rb'(.*)