Html-sanitizer

Latest version: v2.3.1

Safety actively analyzes 613544 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

2.3

================

- Avoided adding whitespace when merging tags of the same type.
- Updated the tests.
- Switched from black to the ruff formatter.

2.2

================

- Changed ``keep_normalized_whitespace`` to preserve whitespace at the tail of
tags, not just between tags.
- Changed the parameters of ``normalize_whitespace_in_text_or_tail`` to be
keyword-only.

2.1

================

- Added a test for a type of misconfiguration.
- Changed the sanitizer configuration validation to not allow unexpected data
types in ``tags``, ``empty``, ``separate``, ``whitespace`` and
``attributes``.

2.0

================

- Raised the minimum Python version to 3.7. Added Python 3.10, 3.11.
- Raised the minimum lxml version to the current 4.9.1.
- Switched from Travis CI to GitHub actions. Added Python 3.9 to the CI
matrix.
- Renamed the main branch to main.
- Switched to a declarative setup.
- Fixed a whitespace dependency in the testsuite.
- Switched to hatchling and ruff.
- Made behavior-altering arguments to ``normalize_overall_whitespace``
keyword-only.

1.9

===================

- Added Python 3.8 to the CI matrix.
- Be able to keep the ``<style>`` tag by adding it to ``tags``.
- Added a style check to the CI matrix.

1.8

===================

- Actually added support for customizing lxml's autolinking behavior
using a dictionary argument.
- Stopped removing explicitly allowed attributes.
- Removed ``id`` from allowed attributes of ``<a>`` tags to provide
an additional layer of defense against DOM clobbering attacks.
- Added an element preprocessor which assigns the ``id`` value to
the ``name`` attribute of anchors if ``name`` isn't set or empty. This
should provide additional backwards compatibility making the ``id``
removal less of a problem when using named anchors.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.