2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 16:51:54 +00:00
This commit is contained in:
Martin Green 2011-08-08 13:11:57 +01:00
parent 0b5e57b85e
commit 59e7c4d5df

View File

@ -110,10 +110,10 @@ def editflatpage(request, path):
if m:
filefound = True
head, body = m.groups()
linksmatch = re.match('(.*)<ul\s+id="links">', body, re.DOTALL + re.IGNORECASE)
if linksmatch:
body, = linksmatch.groups()
if re.search(r"iso-8859-1", html):
linksmatch = re.match('(.*)<ul id="links">', body, re.DOTALL + re.IGNORECASE)
if linksmatch:
body, = linksmatch.groups()
body = unicode(body, "iso-8859-1")
else:
return HttpResponse("Page could not be split into header and body")