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
- Host: GitHub
- URL: https://github.com/kossnocorp/deep-escape-html
- Owner: kossnocorp
- Created: 2015-09-18T06:04:35.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-26T08:09:20.000Z (over 9 years ago)
- Last Synced: 2025-02-01T15:46:06.350Z (3 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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
', 1, true, false]}})
var escape = require('deep-escape-html')
var html = escape({a: "alert('PWNED')", {b: ['
// -> {a: '<script>alert('PWNED')</script>', {b: ['<div></div>', 1, true, false]}}
```## License
MIT