SafeHTML
A simple package for safely rendering HTML using the new template string syntax (PEP 750), in Python 3.14.
Example
from safehtml import html
input = "Jacob <script>alert('xss')</script>"
print(html(t"<p>Hello {input}</p>"))
Output:
<p>Hello Jacob <script>alert('xss')</script></p>
Install
uv init
uv python pin 3.14.0rc1
uv add safehtml
Release files for safehtml 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| safehtml-1.0.1.tar.gz | 2.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| safehtml-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.2 kB
Release files / safehtml-1.0.1.tar.gz
| Download URL | safehtml-1.0.1.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1d3b001977d48f9afdeaf2f0f05c80a93c597912b6cde9a189bf1bc58fa9981
|
|
BLAKE2b-256 checksum How to use checksums |
c0606e428764a0d45d1e56ae8b809012ae73d6e17e20e0f3da85d2ba01a944a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.3
|
Release files / safehtml-1.0.1-py3-none-any.whl
| Download URL | safehtml-1.0.1-py3-none-any.whl |
|---|---|
| Size | 2.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b75d868ccc738ec743493adf18164b1fd969f047314461e1c96eae24c4eda829
|
|
BLAKE2b-256 checksum How to use checksums |
96efa224599b287f1c2207900eff5118aef5a7680720de61566b03f98740c298
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.3
|