PCv5/app/utils/bleach_allowlist.py

25 lines
674 B
Python

# Tags suitable for rendering markdown
markdown_tags = [
"h1", "h2", "h3", "h4", "h5", "h6",
"b", "i", "strong", "em", "tt",
"p", "br",
"span", "div", "blockquote", "code", "pre", "hr",
"ul", "ol", "li", "dd", "dt",
"img",
"a",
"sub", "sup",
"table", "thead", "tbody", "tr", "th", "td",
"form", "fieldset", "input", "textarea",
"label", "progress"
]
markdown_attrs = {
"*": ["id", "class"],
"img": ["src", "alt", "title"],
"a": ["href", "alt", "title", "rel"],
"form": ["action", "method", "enctype"],
"input": ["id", "name", "type", "value"],
"label": ["for"],
"progress": ["value", "min", "max"],
}