chore: bleach-nh3. Convert lists to sets (again; fighting against pre-commit making indent changes that obscured 'rel' from acceptable_attributes)
This commit is contained in:
parent
08fc19d032
commit
2af319bb23
1 changed files with 12 additions and 19 deletions
|
|
@ -207,7 +207,7 @@ def unescape_html(value):
|
|||
|
||||
|
||||
# adapted from https://raw.githubusercontent.com/html5lib/html5lib-python/4aa79f113e7486c7ec5d15a6e1777bfe546d3259/html5lib/sanitizer.py
|
||||
acceptable_elements = [
|
||||
acceptable_elements = {
|
||||
"a",
|
||||
"abbr",
|
||||
"acronym",
|
||||
|
|
@ -309,9 +309,9 @@ acceptable_elements = [
|
|||
"ul",
|
||||
"var",
|
||||
"video",
|
||||
]
|
||||
}
|
||||
|
||||
mathml_elements = [
|
||||
mathml_elements = {
|
||||
"maction",
|
||||
"math",
|
||||
"merror",
|
||||
|
|
@ -339,9 +339,9 @@ mathml_elements = [
|
|||
"munder",
|
||||
"munderover",
|
||||
"none",
|
||||
]
|
||||
}
|
||||
|
||||
svg_elements = [
|
||||
svg_elements = {
|
||||
"a",
|
||||
"animate",
|
||||
"animateColor",
|
||||
|
|
@ -377,9 +377,9 @@ svg_elements = [
|
|||
"title",
|
||||
"tspan",
|
||||
"use",
|
||||
]
|
||||
}
|
||||
|
||||
acceptable_attributes = [
|
||||
acceptable_attributes = {
|
||||
"abbr",
|
||||
"accept",
|
||||
"accept-charset",
|
||||
|
|
@ -540,16 +540,13 @@ acceptable_attributes = [
|
|||
"itemtype",
|
||||
"itemid",
|
||||
"itemref",
|
||||
"datetime",
|
||||
"data-is-group",
|
||||
]
|
||||
}
|
||||
|
||||
mathml_attributes = [
|
||||
mathml_attributes = {
|
||||
"actiontype",
|
||||
"align",
|
||||
"columnalign",
|
||||
"columnalign",
|
||||
"columnalign",
|
||||
"columnlines",
|
||||
"columnspacing",
|
||||
"columnspan",
|
||||
|
|
@ -568,13 +565,10 @@ mathml_attributes = [
|
|||
"mathbackground",
|
||||
"mathcolor",
|
||||
"mathvariant",
|
||||
"mathvariant",
|
||||
"maxsize",
|
||||
"minsize",
|
||||
"other",
|
||||
"rowalign",
|
||||
"rowalign",
|
||||
"rowalign",
|
||||
"rowlines",
|
||||
"rowspacing",
|
||||
"rowspan",
|
||||
|
|
@ -584,15 +578,14 @@ mathml_attributes = [
|
|||
"separator",
|
||||
"stretchy",
|
||||
"width",
|
||||
"width",
|
||||
"xlink:href",
|
||||
"xlink:show",
|
||||
"xlink:type",
|
||||
"xmlns",
|
||||
"xmlns:xlink",
|
||||
]
|
||||
}
|
||||
|
||||
svg_attributes = [
|
||||
svg_attributes = {
|
||||
"accent-height",
|
||||
"accumulate",
|
||||
"additive",
|
||||
|
|
@ -735,4 +728,4 @@ svg_attributes = [
|
|||
"y1",
|
||||
"y2",
|
||||
"zoomAndPan",
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue