mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-15 12:27:05 +00:00
fixing bugs after wookey session
This commit is contained in:
@@ -125,9 +125,12 @@ def expowebpage(request, expowebpath, path):
|
||||
print(f' - 404 error in expowebpage() {path}')
|
||||
return render(request, 'pagenotfound.html', {'path': path}, status="404")
|
||||
|
||||
with open(os.path.normpath(expowebpath / path), "r") as o:
|
||||
html = o.read()
|
||||
|
||||
try:
|
||||
with open(os.path.normpath(expowebpath / path), "r") as o:
|
||||
html = o.read()
|
||||
except:
|
||||
return HttpResponse(default_head + html + '<h3>UTF-8 Parsing Failue:<br>Page could not be parsed using UTF-8:<br>failure detected in expowebpage in views.expo.py</h3> Please edit this <var>:expoweb:</var> page to replace dubious umlauts with HTML entitiies in the expected code. </body' )
|
||||
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user