An open API service indexing awesome lists of open source software.

https://github.com/kossnocorp/deep-escape-html

Deeply escape object's string properties for use in HTML
https://github.com/kossnocorp/deep-escape-html

Last synced: 2 months ago
JSON representation

Deeply escape object's string properties for use in HTML

Awesome Lists containing this project

README

        

# deep-escape-html

Deeply escape object's string properties for use in HTML.
Build on top of [escape-html](https://www.npmjs.com/package/escape-html).

## Example

``` js
var escape = require('deep-escape-html')
var html = escape({a: "alert('PWNED')", {b: ['

', 1, true, false]}})
// -> {a: '<script>alert('PWNED')</script>', {b: ['<div></div>', 1, true, false]}}
```

## License

MIT