Get started with js-xss CDN
MIT licensed
Js-XSS: Automatically escapes user input in JS apps to prevent XSS attacks.
Tags:- sanitization
- xss
- sanitize
- sanitisation
- input
- security
- escape
- encode
- filter
- validator
- html
- injection
- whitelist
Stable version
Copied!
How to start using js-xss CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with js-xss CDN - cdnhub.io</title>
<script src="https://cdn.cdnhub.io/js-xss/1.0.15/xss.min.js"></script>
</head>
<body>
<button id="inject-xss">Inject XSS</button>
<script>
document.getElementById('inject-xss').addEventListener('click', () => {
const xssLibrary = new XSS();
const userInput = document.createElement('div');
userInput.innerHTML = xssLibrary.sanitize('<script>alert("XSS Attack!");</script>');
document.body.appendChild(userInput);
});
</script>
</body>
</html>
All versions
0.0.4
0.0.5
0.0.6
0.0.7
0.0.8
0.0.9
0.1.1
0.1.10
0.1.11
0.1.12
0.1.14
0.1.15
0.1.16
0.1.17
0.1.18
0.1.19
0.1.20
0.1.21
0.1.3
0.1.4
0.1.5
0.1.6
0.1.7
0.1.8
0.1.9
0.2.0
0.2.1
0.2.10
0.2.11
0.2.12
0.2.13
0.2.18
0.2.2
0.2.3
0.2.5
0.2.6
0.2.7
0.2.8
0.2.9
0.3.1
0.3.2
0.3.3
0.3.4
0.3.5
0.3.6
0.3.7
0.3.8
1.0.0
1.0.1
1.0.10
1.0.11
1.0.12
1.0.13
1.0.14
*** 1.0.15
1.0.2
1.0.3
1.0.4
1.0.5
1.0.6
1.0.7
1.0.8
1.0.9