-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
2023-09-20 meeting notes #199
Comments
block vs. allow:Both block and allow list are needed. Block should have precendence over allow. E.g.:
block vs. dropFor me personally, the differentiation between "block" and "drop" is too subtle. I understood them as synonyms. If I read "block" for an element, I assume that this element will be dropped entirely, with all attributes and all child elements, i.e. removed completely from the source document. It makes sense to me that child elements will be dropped as well, otherwise the document might become syntactically or semantically invalid. You cannot have a For cases like I think only "block" = 'drop element and its child elements' is needed in practice. I think that almost all realistic cases can be solved this way. Even if there are edge cases which cannot be expressed this way, they should be carefully weighted whether these edge cases are worth the complications in the spec and for authors. I think "block" is the most intutive term for removing elements or attributes (and their children). |
Please note that whatever is being specified as a custom Sanitizer configuration will be held against the secure defaults. This means developers will not be able to allow |
Issue #198: Configuration edge cases
One of the main results of this discussion was that having attributes both for allowElements and blockBlements doesn’t really work.
Should we block an element with a specific attribute, or just drop the attribute? But why would it be called blockElement then?
This is “Block-clauses with element-dependent attributes” in the linked issue.
New design with elements and attribute properties
elements
instead ofallowElements
attributes
instead ofallowAttributes
dropAttributes
,dropElements
andblock
/flattenElements
.dropAttributes
doesn't allowelements
anddrop/flattenElements
doesn't allowattributes
as filters!Tom: This means the “happy path” uses just the terms “elements” and “attributes”, which is both short and easy to remember
Rename block
allowElements
/allowAttributes
anymore so we don’t need the symmetry with allow.Anne: my concrete proposal here is flattenElements
This is overall a bit similar to the proposal in #181 and in Firefox: https://searchfox.org/mozilla-central/source/dom/webidl/Sanitizer.webidl
The text was updated successfully, but these errors were encountered: