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() + '