@@ -312,6 +312,7 @@ By explicitly sorting the result of this method, we give implementations the opp
312312</div>
313313
3143141. Let |config| be [=this=] 's [=Sanitizer/configuration=] .
315+ 1. [=Assert=] : |config| is [=SanitizerConfig/valid=] .
3153161. If |config|["{{SanitizerConfig/elements}}"] [=map/exists=] :
316317 1. [=list/iterate|For any=] |element| of |config|["{{SanitizerConfig/elements}}"] :
317318 1. If |element|["{{SanitizerElementNamespaceWithAttributes/attributes}}"] [=map/exists=] :
@@ -351,6 +352,7 @@ allow- or remove-lists for attributes. This requires that we distinguish 4 cases
351352</div>
352353
3533541. Let |configuration| be [=this=] 's [=Sanitizer/configuration=] .
355+ 1. [=Assert=] : |configuration| is [=SanitizerConfig/valid=] .
3543561. Set |element| to the result of [=canonicalize a sanitizer element with attributes=] with
355357 |element|.
3563581. If |configuration|["{{SanitizerConfig/elements}}"] [=map/exists=] :
@@ -437,6 +439,7 @@ to [=remove an element=] with |element| and [=this=]'s [=Sanitizer/configuration
437439The <dfn for="Sanitizer" method export>replaceElementWithChildren(|element|)</dfn> method steps are:
438440
4394411. Let |configuration| be [=this=] 's [=Sanitizer/configuration=] .
442+ 1. [=Assert=] : |configuration| is [=SanitizerConfig/valid=] .
4404431. Set |element| to the result of [=canonicalize a sanitizer element=] with |element|.
4414441. If |configuration|["{{SanitizerConfig/replaceWithChildrenElements}}"] [=map/contains=] |element|:
442445 1. Return false.
@@ -457,6 +460,7 @@ up per-element allow- or remove-lists to maintain our validity criteria.
457460</div>
458461
4594621. Let |configuration| be [=this=] 's [=Sanitizer/configuration=] .
463+ 1. [=Assert=] : |configuration| is [=SanitizerConfig/valid=] .
4604641. Set |attribute| to the result of [=canonicalize a sanitizer attribute=] with |attribute|.
4614651. If |configuration|["{{SanitizerConfig/attributes}}"] [=map/exists=] :
462466 1. [=Comment=] : If we have a global allow-list, we need to add |attribute|.
@@ -495,6 +499,7 @@ The <dfn for="Sanitizer" method export>removeAttribute(|attribute|)</dfn> method
495499The <dfn for="Sanitizer" method export>setComments(|allow|)</dfn> method steps are:
496500
4975011. Let |configuration| be [=this=] 's [=Sanitizer/configuration=] .
502+ 1. [=Assert=] : |configuration| is [=SanitizerConfig/valid=] .
4985031. If |configuration|["{{SanitizerConfig/comments}}"] [=map/exists=] and
499504 |configuration|["{{SanitizerConfig/comments}}"] equals |allow|, then return false;
5005051. Set |configuration|["{{SanitizerConfig/comments}}"] to |allow|.
@@ -506,6 +511,7 @@ The <dfn for="Sanitizer" method export>setComments(|allow|)</dfn> method steps a
506511The <dfn for="Sanitizer" method export>setDataAttributes(|allow|)</dfn> method steps are:
507512
5085131. Let |configuration| be [=this=] 's [=Sanitizer/configuration=] .
514+ 1. [=Assert=] : |configuration| is [=SanitizerConfig/valid=] .
5095151. If |configuration|["{{SanitizerConfig/attributes}}"] does not [=map/exist=] , then return false.
5105161. If |configuration|["{{SanitizerConfig/dataAttributes}}"] equals |allow|, then return false.
5115171. If |allow| is true:
@@ -835,6 +841,7 @@ For the main <dfn>sanitize</dfn> operation, using a {{ParentNode}} |node|, a
835841{{Sanitizer}} |sanitizer|, and a [=boolean=] |safe|, run these steps:
836842
8378431. Let |configuration| be the value of |sanitizer|'s [=Sanitizer/configuration=] .
844+ 1. [=Assert=] : |configuration| is [=SanitizerConfig/valid=] .
8388451. If |safe| is true, then set |configuration| to the result of calling [=remove unsafe=] on |configuration|.
8398461. Call [=sanitize core=] on |node|, |configuration|, and with [=handleJavascriptNavigationUrls=] set to |safe|.
840847
@@ -1000,6 +1007,7 @@ This method requires that we distinguish 4 cases:
10001007
10011008</div>
10021009
1010+ 1. [=Assert=]: |configuration| is [=SanitizerConfig/valid=].
100310111. Set |element| to the result of [=canonicalize a sanitizer element=] with |element|.
100410121. Set |modified| to the result of
10051013 [=SanitizerConfig/remove=] |element| from
@@ -1031,6 +1039,7 @@ remove-list. If we add |attribute| to the global remove-list, we may need to do
10311039to fix up per-element allow- or remove-lists to maintain our validity criteria. If we remove
10321040|attribute| from a global allow-list, we may also have to remove it from local remove-lists.
10331041
1042+ 1. [=Assert=]: |configuration| is [=SanitizerConfig/valid=].
103410431. Set |attribute| to the result of [=canonicalize a sanitizer attribute=] with |attribute|.
103510441. If |configuration|["{{SanitizerConfig/attributes}}"] [=map/exists=]:
10361045 1. [=Comment=]: If we have a global allow-list, we need to add |attribute|.
@@ -1078,6 +1087,7 @@ Note: While this algorithm is called [=remove unsafe=], we use
107810871. [=Assert=] : The [=map/get the keys|key set=] of [=built-in safe baseline configuration=]
10791088 [=set/equals=]
10801089 «[ "{{SanitizerConfig/removeElements}}", "{{SanitizerConfig/removeAttributes}}" ] ».
1090+ 1. [=Assert=] : |configuration| is [=SanitizerConfig/valid=] .
108110911. Let |result| be false.
108210921. [=list/For each=] |element| in
10831093 [=built-in safe baseline configuration=] [{{SanitizerConfig/removeElements}}] :
0 commit comments