예제 #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]
예제 #2
0
파일: html.py 프로젝트: TetraAsh/baruwa2
 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]
예제 #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]
예제 #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]