def html(self): from CTFd.utils.config.pages import build_html, build_markdown if self.format == "markdown": return build_markdown(self.content) elif self.format == "html": return build_html(self.content) else: return build_markdown(self.content)
def privacy(): privacy_url = get_config("privacy_url") privacy_text = get_config("privacy_text") if privacy_url: return redirect(privacy_url) elif privacy_text: return render_template("page.html", content=build_markdown(privacy_text)) else: abort(404)
def tos(): tos_url = get_config("tos_url") tos_text = get_config("tos_text") if tos_url: return redirect(tos_url) elif tos_text: return render_template("page.html", content=build_markdown(tos_text)) else: abort(404)
def html(self): from CTFd.utils.config.pages import build_markdown from CTFd.utils.helpers import markup return markup(build_markdown(self.content, sanitize=True))
def html(self): from CTFd.utils.config.pages import build_markdown from CTFd.utils.helpers import markup return markup(build_markdown(self.description))