From 5f5359f93373145f035fefd884c401732e3dd63b Mon Sep 17 00:00:00 2001 From: Martin Green Date: Sun, 7 Aug 2011 19:17:27 +0100 Subject: [PATCH] Changed regex for finding head and body of flat pages. --- flatpages/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flatpages/views.py b/flatpages/views.py index eed5f38..f411bfa 100644 --- a/flatpages/views.py +++ b/flatpages/views.py @@ -15,7 +15,6 @@ import os import re def flatpage(request, path): - print "gggggg", path try: r = Redirect.objects.get(originalURL = path) return HttpResponseRedirect(r.newURL) # Redirect after POST @@ -103,7 +102,7 @@ def editflatpage(request, path): except IOError: raise Http404 html = o.read() - m = re.search(r"(.*).*(.*)", html, re.DOTALL) + m = re.search(r"(.*).*]*>(.*)", html, re.DOTALL) if m: head, body = m.groups() if re.search(r"iso-8859-1", html):