diff options
| author | Kumar Damani <kumar.damani@mail.utoronto.ca> | 2019-04-16 13:17:06 +0000 |
|---|---|---|
| committer | Kumar Damani <kumar.damani@mail.utoronto.ca> | 2019-04-16 13:17:06 +0000 |
| commit | dc46b87abee1e441c07524ddde67fd902a919336 (patch) | |
| tree | 13eba08b8655dfd78e9600ec5f612011a0bf3b35 /node_modules/sanitizer/README.md | |
| parent | 26f4b38e9e5a202756a7c33abc775aea2617aeaf (diff) | |
added some dependencies to package.json
Diffstat (limited to 'node_modules/sanitizer/README.md')
| -rw-r--r-- | node_modules/sanitizer/README.md | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/node_modules/sanitizer/README.md b/node_modules/sanitizer/README.md deleted file mode 100644 index 91bef44..0000000 --- a/node_modules/sanitizer/README.md +++ /dev/null @@ -1,44 +0,0 @@ -## Installation - -``` -npm install sanitizer -``` - -## Require - -``` -var sanitizer = require('sanitizer'); -``` - -## Use - -See /test/test-sanitzer.js for full documentation. - -``` -sanitizer.escape('your dirty string'); // Escapes HTML special characters in attribute values as HTML entities -``` - -``` -var yourParser = sanitizer.makeSaxParser(yourHandler); // Given a SAX-like event handler, produce a function that feeds those events and a parameter to the event handler. -``` - -``` -sanitizer.normalizeRCData('your dirty string'); // Escape entities in RCDATA that can be escaped without changing the meaning. -``` - -``` -sanitizer.sanitize('your dirty string'); // Strips unsafe tags and attributes from html. -``` - -``` -exports.unescapeEntities('your string'); // The plain text of a chunk of HTML CDATA which possibly containing. -``` - -## Caveats - -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 |
