-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/sanitizer: keep sanitized child nodes of rejected nodes
Instead of throwing away the entire tree rooted at a node that we reject, instead move the (sanitized) children of the rejected node up by one level. There are some nodes that we still throw away the entire body for, such as script nodes. Also throw away <a> tags that have no attributes left (because we're not throwing out the bodies anymore). For #61399 Change-Id: Ie62d26f4efbcd95533a0aeb0716fce2a09aaa4c7 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/545917 Reviewed-by: Jonathan Amsterdam <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> kokoro-CI: kokoro <[email protected]> Reviewed-by: Roland Shoemaker <[email protected]>
- Loading branch information
Showing
2 changed files
with
67 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters