def strip(s):
    """ Strip illegal HTML tags from string s """
    parser = StrippingParser()
    parser.feed(s)
    parser.close()
    parser.cleanup()
    return parser.result
 Strip illegal HTML tags from string s 
recipes/Python/52281_Strip_tags_Javascript_HTML_page_leaving_only/recipe-52281.py