mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
12851 replace bleach with nh3 (#14767)
* 12851 replace bleach with nh3 * Move tags & attributes lists to constants.py --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
@ -69,3 +69,27 @@ CSV_DELIMITERS = {
|
||||
'semicolon': ';',
|
||||
'tab': '\t',
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# HTML allowed tags & attributes
|
||||
#
|
||||
|
||||
HTML_ALLOWED_TAGS = {
|
||||
"a", "b", "blockquote", "br", "code", "dd", "del", "div", "dl", "dt", "em", "h1", "h2", "h3", "h4", "h5", "h6",
|
||||
"hr", "i", "img", "li", "ol", "p", "pre", "strong", "table", "tbody", "td", "th", "thead", "tr", "ul"
|
||||
}
|
||||
|
||||
HTML_ALLOWED_ATTRIBUTES = {
|
||||
"a": {"href", "title"},
|
||||
"div": {"class"},
|
||||
"h1": {"id"},
|
||||
"h2": {"id"},
|
||||
"h3": {"id"},
|
||||
"h4": {"id"},
|
||||
"h5": {"id"},
|
||||
"h6": {"id"},
|
||||
"img": {"alt", "src", "title"},
|
||||
"td": {"align"},
|
||||
"th": {"align"},
|
||||
}
|
||||
|
Reference in New Issue
Block a user