Now stripping HTML comments.
This commit is contained in:
parent
b403e5419c
commit
388b49c345
4
NEWS
4
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
|
1.2.21: March 30, 2008
|
||||||
* Made Html_cleaner support many more HTML tags and attributes, so users can
|
* Made Html_cleaner support many more HTML tags and attributes, so users can
|
||||||
cut and paste from other programs into Luminotes.
|
cut and paste from other programs into Luminotes.
|
||||||
|
|
|
@ -171,8 +171,7 @@ class Html_cleaner(HTMLParser):
|
||||||
self.result.append( xssescape('&%s' % ref) )
|
self.result.append( xssescape('&%s' % ref) )
|
||||||
|
|
||||||
def handle_comment(self, comment):
|
def handle_comment(self, comment):
|
||||||
if comment:
|
pass # strip comments
|
||||||
self.result.append( xssescape("<!--%s-->" % comment) )
|
|
||||||
|
|
||||||
def handle_starttag(self, tag, method, attrs):
|
def handle_starttag(self, tag, method, attrs):
|
||||||
if tag not in self.permitted_tags:
|
if tag not in self.permitted_tags:
|
||||||
|
|
Reference in New Issue