Kida 0.1.1
__html__ protocol support
Released: January 12, 2026
Bug fix release for HTML escaping interoperability.
Highlights
- 🔗
__html__protocol — Interoperability with markupsafe and other libraries
Fixed
__html__Protocol Support
html_escape() now respects the __html__ protocol, enabling interoperability with markupsafe.Markupand other libraries that implement this standard.
Before: Only Kida's nativeMarkupclass was recognized as safe, causing double-escaping:
from markupsafe import Markup as MSMarkup
content = MSMarkup("<strong>Bold</strong>")
template.render(content=content)
# Output: <strong>Bold</strong> ❌ Double-escaped!
After: Any object with __html__()method is recognized as pre-escaped:
from markupsafe import Markup as MSMarkup
content = MSMarkup("<strong>Bold</strong>")
template.render(content=content)
# Output: <strong>Bold</strong> ✅ Correct!
This enables seamless integration with:
markupsafe.Markupjinja2.Markup- Any custom class implementing
__html__()