This is a npm module to escape and unescape html entities to minimise XSS attack on user-form inputs
npm install xsshealer --save
var xsshealer = require('xsshealer') escape = xsshealer.escape unescape = xsshealer.unescape
var html = '
', escaped = escape(html); unescaped = unescaped(escaped);console.log('html',html,'escaped',escaped,'unescaped',unescaped);
npm test
In lieu of formal styleguide, take care to maintain the present style. Add unit tests for any changed or new functionality
- 0.1.0 Initial Release