Exemplo n.º 1
0
 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]
Exemplo n.º 2
0
 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]
Exemplo n.º 3
0
 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]
Exemplo n.º 4
0
 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]