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
Metadata
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 | Provenance | Actions |
|---|---|---|---|---|
| safehtml-1.0.1.tar.gz | 2.4 kB | Without provenance | Details for safehtml-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| safehtml-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for safehtml-1.0.1-py3-none-any.whl |
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
|
Security for safehtml 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.