HtmlSanitizer becomes Python 2.6 compatible.
authorDaniel Hans <Daniel.M.Hans@gmail.com>
Mon, 02 Nov 2009 23:38:43 +0100
changeset 3074 ebda36efbd61
parent 3073 6e100e194680
child 3075 1e78db95e38a
HtmlSanitizer becomes Python 2.6 compatible. The Cleaner class must not have any arguments when calling __init__ function for the object class, because in this case Python 2.6 raises TypeError (while previous versions just ignored them).
app/htmlsanitizer/HtmlSanitizer.py
--- a/app/htmlsanitizer/HtmlSanitizer.py	Mon Nov 02 16:23:58 2009 +0100
+++ b/app/htmlsanitizer/HtmlSanitizer.py	Mon Nov 02 23:38:43 2009 +0100
@@ -124,7 +124,7 @@
         self.settings.update(kwargs)
         if args :
             self.settings['filters'] = args
-        super(Cleaner, self).__init__(string_or_soup, *args, **kwargs)
+        super(Cleaner, self).__init__()
         self.string = string_or_soup
     
     def __call__(self, string = None, **kwargs):