From d1d4e497bee1f22a8cea114c8bc149350456b631 Mon Sep 17 00:00:00 2001 From: rattatwinko Date: Mon, 20 Apr 2026 08:30:39 +0200 Subject: [PATCH] fixed a issue using bs4. see TODO --- TODO.md | 30 ++++++++++++++++++++++++++++-- requirements.txt | Bin 178 -> 161 bytes src/sanitizer.py | 29 +++++++++++++++++++++++++++-- 3 files changed, 55 insertions(+), 4 deletions(-) diff --git a/TODO.md b/TODO.md index 0810bfb..16d1880 100644 --- a/TODO.md +++ b/TODO.md @@ -43,7 +43,7 @@ NOTE: That things which are in italic text are already implemented! --- ### passthrough safety -- [ ] add stderr warning for user +- *[x] add stderr warning for user* --- @@ -53,4 +53,30 @@ NOTE: That things which are in italic text are already implemented! ### Config files: - [ ] allow custom JSON/YAML/yadayadayada configurations - - pass in through CLI with flag --config "file.idk" \ No newline at end of file + - pass in through CLI with flag --config "file.idk" + +## Fixes: + +## Content of tag staying after removal of tag + +When running strict/loose: +``` +(venv) rattatwinko@kubuntu:~/Documents/sanigi-html$ echo "

Heading

" | python3 src/main.py --mode strict +[ DEBUG@2026-04-20 07:54:57 ]: called sanitizer! using this as args: +

Heading

+['p', 'b', 'i', 'u', 'em', 'strong', 'ul', 'ol', 'li', 'br', 'hr', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'] +[] +True +

Heading

**var=j;** +``` + +You can see that the ```