Htmltools

Latest version: v0.6.0

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

Scan your dependencies

Page 2 of 3

0.4.0

* Added `HTMLTextDocument` class, which takes as input a string representation of an HTML document. (61)

* Added `htmltools.html_dependency_render_mode`. If this is set to `"json"`, then `HTMLDependency` objects will be rendered as JSON inside of `<script>` tags. (61)

0.3.0

New features

* Added `Tag` methods `remove_class` and `add_style`. (57)

* Added support for `Tag`'s `add_class(prepend=)`. (57)

Other changes

* Dropped support for Python 3.7 (56)

0.2.1

Bug fixes

* Fixed the stype signature of the `TagFunction` protocol class.

0.2.0

New features

* Added support for URL based `HTMLDependency` objects. (53)

* Tag functions now have a boolean parameter `_add_ws`, which determines if the tag should be surrounded by whitespace. Tags which are normally block elements (like `div`) have this default to `True`, and tags which are normally inline elements (like `span`) have this default to `False`. This makes it possible to create HTML where neighboring elements have no whitespace between them. For example, `span(span("a"), span("b"))` will now yield `<span><span>a</span><span>b</span></span>`. (54)

0.1.5

New features

* Changed types hints for `Tag` functions. The new types are `TagChild`, `TagNode`, `TagAttrValue`, and `TagAttrs`. (51)

* Add public-facing `html_escape` function.

Bug fixes

* Removed default argument values which were mutable objects.

Other changes

* Moved packages from requirements-dev.txt to setup.cfg.

0.1.4

Bug fixes

* Added alias for `htmltools._util._package_dir` function, which was used by shinywidgets 0.1.4.

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.