Skip to content

Commit a2a9761

Browse files
test(sanitize): drop the optimization scaffolding
The benchmarks and the reference-implementation equivalence harness existed to justify the sanitizer rewrite. They have served that purpose, so remove them along with the verbatim copy of the old pipeline they carried. Five checks move into sanitize_test.go rather than going away, because none of them reference the old implementation and all of them guard behaviour the rewrite introduced: - isHTMLInert must be a fixed point of the live bluemonday policy, checked byte by byte and as whole strings, with the accepted byte set pinned explicitly. Nothing else fails if that set is widened, and widening it changes sanitizer output. - Both filters are fixed points on their own output, which is what licenses Sanitize to skip its second pass. - Clean ASCII sanitizes with zero allocations. - Invalid UTF-8 is re-encoded to U+FFFD. - Known payloads still lose content. Net -560 lines. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent d8e30fa commit a2a9761

4 files changed

Lines changed: 193 additions & 753 deletions

File tree

pkg/github/minimal_types_bench_test.go

Lines changed: 0 additions & 80 deletions
This file was deleted.

pkg/sanitize/bench_test.go

Lines changed: 0 additions & 193 deletions
This file was deleted.

0 commit comments

Comments
 (0)