refactor(backend): replace bleach with nh3 and bump weasy#11655
Merged
SchrodingersGat merged 8 commits intoinventree:masterfrom Apr 2, 2026
Merged
refactor(backend): replace bleach with nh3 and bump weasy#11655SchrodingersGat merged 8 commits intoinventree:masterfrom
SchrodingersGat merged 8 commits intoinventree:masterfrom
Conversation
Agent-Logs-Url: https://github.com/matmair/InvenTree/sessions/913a447a-5efa-4fa3-b8b1-6af5feaa24f0 Co-authored-by: matmair <66015116+matmair@users.noreply.github.com>
✅ Deploy Preview for inventree-web-pui-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #11655 +/- ##
==========================================
- Coverage 91.45% 91.44% -0.01%
==========================================
Files 963 963
Lines 49836 49841 +5
==========================================
+ Hits 45576 45578 +2
- Misses 4260 4263 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
SchrodingersGat
approved these changes
Apr 2, 2026
Member
|
@matmair nice work getting this sorted finally, as the tests are unchanged here, this looks good to me! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Most work done by AI: Github Copilot (claude sonnet 4.6)
weasyprint has some issues and we need to bump, but we can not upgrade due to complex dependencies between weasyprint and bleach (via some transitive deps); so our usage of bleach needs to be replaced by something - in this case nh3 which seems to be what most users of bleach switched to
Replaces #11415
Fixes https://github.com/inventree/InvenTree/security/dependabot/301