Skip to content

Release v0.37.0

Choose a tag to compare

@EmilStenstrom EmilStenstrom released this 18 Jan 15:49
· 138 commits to main since this release

Added

  • Speed up sanitization with a fused transform and optimized regex matching. Switching from imperative style sanitization to one based on transforms is 20% slower. We believe it's worth it because of the improved reviewability of the code.

Changed

  • BREAKING: Sanitization now happens during parsing/construction instead of at serialization time. The the safe and policy keywords move from to_html to the JustHTML constructor. Before: JustHTML(...).to_html(safe=..., policy=...), After: JustHTML(safe=..., policy=...).to_html().

Docs

  • Update documentation to reflect sanitize-at-construction behavior.
  • Add CLI documentation for --allow-tags.
  • Add a transforms example and refresh performance benchmark snippet in README.
  • Clarify lxml sanitization guidance in README.