Metadata-Version: 2.3
Name: xss-shield
Version: 1.2.1
Summary: A library used to stop your website from being attacked.
Project-URL: Homepage, https://github.com/GordonZhang2024/xss-shield/
Project-URL: Issues, https://github.com/GordonZhang2024/xss-shield/issues
Project-URL: Docs, https://xss-shield.readthedocs.io/en/latest/
Author-email: Gordon Zhang <jp20171211@163.com>
License-File: LICENSE
Keywords: attack,django,flask,shield,web,xss
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# xss-shield
A Python library to prevent your website from being attacked.

[PyPI](https://pypi.org/project/xss-shield/)
[GitHub](https://github.com/GordonZhang2024/xss-shield/tree/main)
[Docs](https://xss-shield.readthedocs.io/en/latest/)

![PyPI - Downloads](https://img.shields.io/pypi/dw/xss-shield)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/xss-shield)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/xss-shield)
![GitHub top language](https://img.shields.io/github/languages/top/GordonZhang2024/xss-shield)
[![Documentation Status](https://readthedocs.org/projects/xss-shield/badge/?version=latest)](https://xss-shield.readthedocs.io/en/latest/?badge=latest)

## Installing
Type command:
```bash
$ 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:
```python
import xss_shield

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

## Docs
**The docs are availible [here](https://xss-shield.readthedocs.io/en/latest/)**
