sanitizer.unescapeEntities

0.1.3 • Public • Published

This is a fork of theSmaw/Caja-HTML-Sanitizer just for the unescapeEntities method.

21.7kb to 5.9kb minified if you just need to unescape.

Installation

npm install sanitizer.unescapeEntities

Require

var unescapeEntities = require('sanitizer.unescapeEntities');

Use

See /test/test-sanitzer.js for full documentation.

unescapeEntities('your string'); // The plain text of a chunk of HTML CDATA which possibly containing.

Caveats

Skattyadz disclaimer: I've just deleted most of the API then performed some tree shaking. I don't understand this code

Original disclaimer: It's use this at your own risk really - Caja HTML Sanitizer was written by people far cleverer than me. I have just repackaged it to solve a problem I had (sanitization on a Node server). It seems to work, and it passes all its tests in re-packaged form - however I don't fully understand its internals so cannot guarantee its security.

More information

http://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/plugin/html-sanitizer.js

/sanitizer.unescapeEntities/

    Package Sidebar

    Install

    npm i sanitizer.unescapeEntities

    Weekly Downloads

    0

    Version

    0.1.3

    License

    Apache-2.0

    Last publish

    Collaborators

    • codeincontext