def build_html(html): html = markdown(html) if current_app.config["HTML_SANITIZATION"] is True: html = sanitize_html(html) return html
def build_html(html): html = markdown(html) html = sanitize_html(html) return html
def build_markdown(md, sanitize=False): html = markdown(md) html = format_variables(html) if current_app.config["HTML_SANITIZATION"] is True or sanitize is True: html = sanitize_html(html) return html