From fd504d9f09466ded3cbadbdf43e7fd3e43cc57f4 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 1 Sep 1995 20:33:32 +0000 Subject: took out forms support (in favor a Grail extension) --- Lib/htmllib.py | 97 ++-------------------------------------------------------- 1 file changed, 3 insertions(+), 94 deletions(-) diff --git a/Lib/htmllib.py b/Lib/htmllib.py index 5591429..2d82c77 100644 --- a/Lib/htmllib.py +++ b/Lib/htmllib.py @@ -48,7 +48,9 @@ class HTMLParser(SGMLParser): def save_end(self): data = self.savedata self.savedata = None - return string.join(string.split(data)) + if not self.nofill: + data = string.join(string.split(data)) + return data # --- Hooks for anchors; should probably be overridden @@ -67,36 +69,6 @@ class HTMLParser(SGMLParser): def handle_image(self, src, alt): self.handle_data(alt) - # --- Hooks for forms; should probably be overridden - - def form_bgn(self, action, method, enctype): - self.do_p([]) - self.handle_data("
") - - def form_end(self): - self.handle_data("
") - self.do_p([]) - - def handle_input(self, type, options): - self.handle_data("") - - def select_bgn(self, name, size, multiple): - self.handle_data("") - - def handle_option(self, value, selected): - self.handle_data("