Skip to content

We don't allow allow+remove for global attributes; but we do for per-element attributes. #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
otherdaniel opened this issue Mar 28, 2025 · 0 comments
Assignees
Labels
sanitizer-algorithm issue with the algorithm
Milestone

Comments

@otherdaniel
Copy link
Collaborator

This is split out from #249:

Config procesing: We currently throw when an element or global attribute is listed in both allow & remove, but not for per-element attributes.

new Sanitizer({elements: ["p"], removeElements: ["p"]})  // throws
new Sanitizer({elements: [{name: "p", attributes: ["id"], removeAttributes: ["id"]}]})  // does not throw.
@otherdaniel otherdaniel self-assigned this Mar 28, 2025
@otherdaniel otherdaniel added the editorial editorial spec changes label Mar 28, 2025
@otherdaniel otherdaniel added this to the v1 milestone Mar 28, 2025
@otherdaniel otherdaniel added sanitizer-algorithm issue with the algorithm and removed editorial editorial spec changes labels Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sanitizer-algorithm issue with the algorithm
Projects
None yet
Development

No branches or pull requests

1 participant