0.1.4 • Published 8 years ago

sanitize-caja v0.1.4

Weekly downloads
2,250
License
BSD-2-Clause
Repository
github
Last release
8 years ago

Build Status

sanitize-caja

Sanitize HTML content using the Google Caja JsHtmlSanitizer and a set of basic assumptions, and a wrapper to make it all work in nodejs without global variable leaks and so on.

This is a slightly 'loosened' version of Caja's restrictions, to allow for things like images, links, and a few HTML5 elements.

api

sanitize(html: string) -> sanitized string

Sanitize a string of HTML content, returning a sanitized string.

install

npm install sanitize-caja

example

var sanitize = require('sanitize-caja');

document.write(sanitize(evilUserInput));

see also

0.1.4

8 years ago

0.1.3

9 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.0

11 years ago