def bleach_clean(stream):
    """
    Sanitize malicious attempts but keep the `EXCERPT_TOKEN`.
    By default, only keeps `bleach.ALLOWED_TAGS`.
    """
    return bleach.clean(
        stream,
        tags=current_app.config['MD_ALLOWED_TAGS'],
        attributes=current_app.config['MD_ALLOWED_ATTRIBUTES'],
        styles=current_app.config['MD_ALLOWED_STYLES'],
        strip_comments=False)
def bleach_clean ( stream ) : return bleach . clean ( stream , tags = current_app . config [ 'MD_ALLOWED_TAGS' ] , attributes = current_app . config [ 'MD_ALLOWED_ATTRIBUTES' ] , styles = current_app . config [ 'MD_ALLOWED_STYLES' ] , strip_comments = False )
Sanitize malicious attempts but keep the `EXCERPT_TOKEN`.
    By default, only keeps `bleach.ALLOWED_TAGS`.