xssjs
xss escape/unescape javascript library
How to build your own xssjs
Clone a copy of the main xssjs git repo by running:
git clone git://github.com/kazikai/xssjs.git
Install rollup npm global
cs xssjs
npm i -g rollup
npm i
Enter the xssjs directory and run the build script:
npm run build
build
npm run build
development
npm run dev
test
npm test or npm run test
How to use
Bower
bower install xssjs
Browser
<script src="dist/xss.js"></script>
let cleanString = xss.excape('dirty string');
let originString = xss.unescape(cleanString);
Node.js
npm i --save xssjs
const xss = require('xssjs');
let cleanString = xss.excape('dirty string');
let originString = xss.unescape(cleanString);