Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@ npm install sanitizer

## Require

```
```js
var sanitizer = require('sanitizer');
```

## Use

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

```
```js
sanitizer.escape('your dirty string'); // Escapes HTML special characters in attribute values as HTML entities
```

```
```js
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.
```

```
```js
sanitizer.normalizeRCData('your dirty string'); // Escape entities in RCDATA that can be escaped without changing the meaning.
```

```
```js
sanitizer.sanitize('your dirty string'); // Strips unsafe tags and attributes from html.
```

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

Expand Down