[Lxml-checkins] r44084 - lxml/branch/html/src/lxml/html

scoder at codespeak.net scoder at codespeak.net
Thu Jun 7 12:53:50 CEST 2007


Author: scoder
Date: Thu Jun  7 12:53:50 2007
New Revision: 44084

Modified:
   lxml/branch/html/src/lxml/html/clean.py
Log:
removed disabled code section

Modified: lxml/branch/html/src/lxml/html/clean.py
==============================================================================
--- lxml/branch/html/src/lxml/html/clean.py	(original)
+++ lxml/branch/html/src/lxml/html/clean.py	Thu Jun  7 12:53:50 2007
@@ -284,23 +284,6 @@
     for el in _remove:
         el.drop_tag()
 
-    if False and remove_tags:
-        xpath = ' | '.join([
-            "descendant-or-self::%s" % tag
-            for tag in remove_tags])
-        for el in doc.xpath(xpath):
-            if strip_tags:
-                if el.getparent() is not None:
-                    el.drop_tag()
-                else:
-                    # We have to drop the parent-most tag, which we can't
-                    # do.  Instead we'll rewrite it:
-                    el.tag = 'div'
-                    el.attrib.clear()
-            else:
-                # FIXME: Should we test if this has been removed because of a parent?
-                el.drop_element()
-
     if remove_unknown_tags:
         if allow_tags:
             raise ValueError(


More information about the lxml-checkins mailing list