Skip to main content

xss-shield

A Python library to prevent your website from being attacked.

PyPI GitHub Docs

PyPI - Downloads PyPI - Python Version PyPI - Wheel GitHub top language Documentation Status

Installing

Type command:

$ pip install xss-shield

Usage

Function excape(s: str, strict=True)

Arguments

s: the string to parse

strict: if strict = False -> only replace <script> tag

example:

import xss_shield

unsafe_str = '<script>alert("Bad.");</script>'
safe_str = xss_shield.escape(unsafe_str)

Docs

The docs are availible here

Metadata

Release files for xss-shield 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xss-shield 1.2.2
File Size Uploaded Provenance
xss_shield-1.2.2.tar.gz 61.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for xss-shield 1.2.2
File Interpreter ABI Platform
xss_shield-1.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 64.6 kB

Release files / xss_shield-1.2.2.tar.gz

Download URL xss_shield-1.2.2.tar.gz
Size 61.0 kB
Tags Source
SHA-256 checksum
How to use checksums
80345ebe13833f1d2433727d812f83217c7738507fe6ef41872a57272a426b53
BLAKE2b-256 checksum
How to use checksums
21a121d54be3f93c840a921f659ed30a4a839fc33f46607bf02bfe1cb2210551
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / xss_shield-1.2.2-py3-none-any.whl

Download URL xss_shield-1.2.2-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
feadd1386f3e615527e45b8c876cfa0ca915b8fdffd341601e856b5a0e1bb401
BLAKE2b-256 checksum
How to use checksums
e58587c253d1410ee2e12167f33745b8f0589800c9c9918662a60abd47911706
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.4

Security for xss-shield 1.2.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page