🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

xss-shield

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xss-shield

A library used to stop your website from being attacked.

1.2.2
100

Supply Chain Security

100

Vulnerability

98

Quality

100

Maintenance

100

License

Maintainers
1

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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts