OpenQuizz
Une application de gestion des contenus pédagogiques
|
Public Member Functions | |
def | __init__ (self, source, allowed_elements=allowed_elements, allowed_attributes=allowed_attributes, allowed_css_properties=allowed_css_properties, allowed_css_keywords=allowed_css_keywords, allowed_svg_properties=allowed_svg_properties, allowed_protocols=allowed_protocols, allowed_content_types=allowed_content_types, attr_val_is_uri=attr_val_is_uri, svg_attr_val_allows_ref=svg_attr_val_allows_ref, svg_allow_local_href=svg_allow_local_href) |
def | __iter__ (self) |
def | sanitize_token (self, token) |
def | allowed_token (self, token) |
def | disallowed_token (self, token) |
def | sanitize_css (self, style) |
![]() | |
def | __init__ (self, source) |
def | __getattr__ (self, name) |
Sanitizes token stream of XHTML+MathML+SVG and of inline style attributes
def __init__ | ( | self, | |
source, | |||
allowed_elements = allowed_elements , |
|||
allowed_attributes = allowed_attributes , |
|||
allowed_css_properties = allowed_css_properties , |
|||
allowed_css_keywords = allowed_css_keywords , |
|||
allowed_svg_properties = allowed_svg_properties , |
|||
allowed_protocols = allowed_protocols , |
|||
allowed_content_types = allowed_content_types , |
|||
attr_val_is_uri = attr_val_is_uri , |
|||
svg_attr_val_allows_ref = svg_attr_val_allows_ref , |
|||
svg_allow_local_href = svg_allow_local_href |
|||
) |
Creates a Filter :arg allowed_elements: set of elements to allow--everything else will be escaped :arg allowed_attributes: set of attributes to allow in elements--everything else will be stripped :arg allowed_css_properties: set of CSS properties to allow--everything else will be stripped :arg allowed_css_keywords: set of CSS keywords to allow--everything else will be stripped :arg allowed_svg_properties: set of SVG properties to allow--everything else will be removed :arg allowed_protocols: set of allowed protocols for URIs :arg allowed_content_types: set of allowed content types for ``data`` URIs. :arg attr_val_is_uri: set of attributes that have URI values--values that have a scheme not listed in ``allowed_protocols`` are removed :arg svg_attr_val_allows_ref: set of SVG attributes that can have references :arg svg_allow_local_href: set of SVG elements that can have local hrefs--these are removed
def __iter__ | ( | self | ) |
Reimplemented from Filter.
def allowed_token | ( | self, | |
token | |||
) |
def disallowed_token | ( | self, | |
token | |||
) |
def sanitize_css | ( | self, | |
style | |||
) |
def sanitize_token | ( | self, | |
token | |||
) |
allowed_attributes |
allowed_content_types |
allowed_css_keywords |
allowed_css_properties |
allowed_elements |
allowed_protocols |
allowed_svg_properties |
attr_val_is_uri |
svg_allow_local_href |
svg_attr_val_allows_ref |