Rename PageFormatter::send_page() to PageFormatter::format()
authorBernie Innocenti <bernie@codewiz.org>
Mon, 28 Jul 2008 06:03:29 +0000 (11:48 +0545)
committerBernie Innocenti <bernie@codewiz.org>
Mon, 28 Jul 2008 06:03:29 +0000 (11:48 +0545)
geekigeeki.py

index b2e2895f4562af32fed2ea813c805e09d1ac07cb..0607006331db081e90b43ceab3430f6bac4726d3 100755 (executable)
@@ -233,11 +233,11 @@ def handle_edit(pagename):
             pg.save(form['file'].file.read())
         else:
             pg.save(form['savetext'].value.replace('\r\n', '\n'))
-        pg.send_page()
+        pg.format()
     elif 'cancel' in form:
         pg.msg_text = 'Editing canceled'
         pg.msg_type = 'notice'
-        pg.send_page()
+        pg.format()
     else: # preview or edit
         text = None
         if 'preview' in form:
@@ -463,7 +463,7 @@ class PageFormatter:
             + r"|(?P<hurl>\[\[([^\s\|]+)(?:\s*\|\s*([^\]]+)|)\]\])"
 
             # Inline HTML
-            + r"|(?P<html><(/|)(div|span|iframe|form|input))"
+            + r"|(?P<html><(/|)(br|hr|div|form|iframe|input|span))"
             + r"|(?P<ent>[<>&])"
 
             # Auto links
@@ -607,7 +607,7 @@ class Page:
         else:
             send_guru("Read access denied by ACLs", "notice")
 
-    def send_page(self):
+    def format(self):
         page_name = None
         if self.can_write():
             page_name = self.page_name
@@ -729,7 +729,7 @@ try:
 
         if file_re.match(query):
             if word_re.match(query):
-                Page(query).send_page()
+                Page(query).format()
             else:
                 from mimetypes import MimeTypes
                 type, encoding = MimeTypes().guess_type(query)