Package gozerbot :: Package contrib :: Module feedparser :: Class _HTMLSanitizer
[hide private]
[frames] | no frames]

Class _HTMLSanitizer

source code

markupbase.ParserBase --+        
                        |        
       sgmllib.SGMLParser --+    
                            |    
           _BaseHTMLProcessor --+
                                |
                               _HTMLSanitizer

Instance Methods [hide private]
 
reset(self)
Reset this instance.
source code
 
unknown_starttag(self, tag, attrs) source code
 
unknown_endtag(self, tag) source code
 
handle_pi(self, text) source code
 
handle_decl(self, text) source code
 
handle_data(self, text) source code

Inherited from _BaseHTMLProcessor: __init__, feed, handle_charref, handle_comment, handle_entityref, normalize_attrs, output

Inherited from sgmllib.SGMLParser: close, error, finish_endtag, finish_shorttag, finish_starttag, get_starttag_text, goahead, handle_endtag, handle_starttag, parse_endtag, parse_pi, parse_starttag, report_unbalanced, setliteral, setnomoretags, unknown_charref, unknown_entityref

Inherited from markupbase.ParserBase: getpos, parse_comment, parse_declaration, parse_marked_section, unknown_decl, updatepos

Inherited from markupbase.ParserBase (private): _parse_doctype_attlist, _parse_doctype_element, _parse_doctype_entity, _parse_doctype_notation, _parse_doctype_subset

Class Variables [hide private]
  acceptable_elements = ['a', 'abbr', 'acronym', 'address', 'are...
  acceptable_attributes = ['abbr', 'accept', 'accept-charset', '...
  unacceptable_elements_with_end_tag = ['script', 'applet']

Inherited from _BaseHTMLProcessor: elements_no_end_tag

Inherited from sgmllib.SGMLParser: entitydefs

Inherited from sgmllib.SGMLParser (private): _decl_otherchars

Method Details [hide private]

reset(self)

source code 

Reset this instance. Loses all unprocessed data.

Overrides: markupbase.ParserBase.reset

unknown_starttag(self, tag, attrs)

source code 
Overrides: sgmllib.SGMLParser.unknown_starttag

unknown_endtag(self, tag)

source code 
Overrides: sgmllib.SGMLParser.unknown_endtag

handle_pi(self, text)

source code 
Overrides: sgmllib.SGMLParser.handle_pi

handle_decl(self, text)

source code 
Overrides: sgmllib.SGMLParser.handle_decl

handle_data(self, text)

source code 
Overrides: sgmllib.SGMLParser.handle_data

Class Variable Details [hide private]

acceptable_elements

Value:
['a',
 'abbr',
 'acronym',
 'address',
 'area',
 'b',
 'big',
 'blockquote',
...

acceptable_attributes

Value:
['abbr',
 'accept',
 'accept-charset',
 'accesskey',
 'action',
 'align',
 'alt',
 'axis',
...