Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to htmltools for Python will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [UNRELEASED]



## [0.5.3] 2024-07-18

* HTML tags in docstrings are now escaped. (#90)
Expand Down
2 changes: 1 addition & 1 deletion htmltools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.5.3"
__version__ = "0.5.3.9000"

from . import svg, tags
from ._core import TagAttrArg # pyright: ignore[reportUnusedImport] # noqa: F401
Expand Down
4 changes: 2 additions & 2 deletions htmltools/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def _normalize_attr_value(x: TagAttrValue) -> Optional[str]:
return ""
if isinstance(x, (int, float)):
return str(x)
if isinstance(x, (HTML, str)):
if isinstance(x, (HTML, str)): # type: ignore[reportUnnecessaryIsInstance]
return x
raise TypeError(
f"Invalid type for attribute: {type(x)}."
Expand Down Expand Up @@ -1512,7 +1512,7 @@ def as_html_tags(
Render the dependency as a ``TagList()``.
"""
d = self.as_dict(lib_prefix=lib_prefix, include_version=include_version)
metas = [Tag("meta", **m) for m in self.meta]
metas = [Tag("meta", **m) for m in d["meta"]]
links = [Tag("link", **s) for s in d["stylesheet"]]
scripts = [Tag("script", **s) for s in d["script"]]
return TagList(*metas, *links, *scripts, self.head)
Expand Down
Loading