예제 #1
0
파일: pages.py 프로젝트: KaitoRyouga/CTFd
def build_html(html):
    html = markdown(html)
    if current_app.config["HTML_SANITIZATION"] is True:
        html = sanitize_html(html)
    return html
예제 #2
0
def build_html(html):
    html = markdown(html)
    html = sanitize_html(html)
    return html
예제 #3
0
파일: pages.py 프로젝트: DevLuce/CTFd
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