__init__(self,
text,
sanitize=False,
permitted_tags=['a', 'b', 'blockquote', 'br/', 'i', 'li', 'ol', 'ul', 'p', 'c...,
allowed_attributes={'a': ['href', 'title'], 'blockquote': ['type'], 'img': ['src'...)
(Constructor)
| source code
|
:param text: the XML text
:param sanitize: sanitize text using the permitted tags and allowed
attributes (default False)
:param permitted_tags: list of permitted tags (default: simple list of
tags)
:param allowed_attributes: dictionary of allowed attributed (default
for A, IMG and BlockQuote).
The key is the tag; the value is a list of allowed attributes.
- Overrides:
object.__init__
|