0.1.6 • Published 8 years ago

es-en v0.1.6

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Escaper

A small library which provides methods to escape and unescape HTML entities before inserting untrusted data into HTML element content. (XSS prevention)

Usage

var hescape = require('es-en');
var escape = hescape.escape;
var unescape = hescape.unescape;

var html = '<h1>Help me!</h1>';
var escaped = escape(html);
var unescaped = unescape(escaped);

console.log('html', html, 'escaped', escaped, 'unescaped', unescaped);

Output - " html <h1>Help me!</h1> escaped &lt;h1&gt;Help me!&lt;&#x2F;h1&gt; unescaped <h1>Help me!</h1> " 

Tests

npm test

Contributing

Add unit tests for any new or changed functionality.

Release History

  • 0.1.0 Initial release
0.1.6

8 years ago

0.1.5

8 years ago

0.2.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago

0.1.0

8 years ago