def __call__(self, doc): Cleaner.__call__(self, doc) safe_attrs = set(defs.safe_attrs) safe_attrs.remove('class') for elm in doc.iter(): attrib = elm.attrib for aname in attrib.keys(): if aname not in safe_attrs: del attrib[aname]
def __call__(self, doc): Cleaner.__call__(self, doc) safe_attrs = set(defs.safe_attrs) safe_attrs.remove('class') for el in doc.iter(): attrib = el.attrib for aname in attrib.keys(): if aname not in safe_attrs: del attrib[aname]
def __call__(self, doc): Cleaner.__call__(self, doc) safe_attrs = set(defs.safe_attrs) safe_attrs.add('face') for el in doc.iter(): attrib = el.attrib for aname in attrib.keys(): if aname not in safe_attrs: del attrib[aname]
def __call__(self, doc): "clean signatures" Cleaner.__call__(self, doc) safe_attrs = set(defs.safe_attrs) safe_attrs.add('face') for elm in doc.iter(): attrib = elm.attrib for aname in attrib.keys(): if aname not in safe_attrs: del attrib[aname]