From 388b49c34597f1a38b74e5133c8f7f787a2ef669 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 31 Mar 2008 04:29:18 +0000 Subject: [PATCH] Now stripping HTML comments. --- NEWS | 4 ++++ controller/Html_cleaner.py | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 7703209..c8f2bd4 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +1.2.22: March 30, 2008 + * Made Html_cleaner strip HTML comments, which Open Office adds for styling + purposes. + 1.2.21: March 30, 2008 * Made Html_cleaner support many more HTML tags and attributes, so users can cut and paste from other programs into Luminotes. diff --git a/controller/Html_cleaner.py b/controller/Html_cleaner.py index 6f50412..3c6e5a1 100644 --- a/controller/Html_cleaner.py +++ b/controller/Html_cleaner.py @@ -171,8 +171,7 @@ class Html_cleaner(HTMLParser): self.result.append( xssescape('&%s' % ref) ) def handle_comment(self, comment): - if comment: - self.result.append( xssescape("" % comment) ) + pass # strip comments def handle_starttag(self, tag, method, attrs): if tag not in self.permitted_tags: