Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nescalante/htmlsanitize
https://github.com/nescalante/htmlsanitize
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/nescalante/htmlsanitize
- Owner: nescalante
- License: mit
- Created: 2017-09-25T17:47:28.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-09T18:42:30.000Z (9 months ago)
- Last Synced: 2024-11-11T21:09:30.139Z (about 1 month ago)
- Language: JavaScript
- Size: 27.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: License
Awesome Lists containing this project
README
# HTML Sanitize
HTML sanitizer for the browser originally extracted from Angular [`ngSanitize`](https://github.com/angular/angular.js/blob/master/src/ngSanitize/sanitize.js) function
## Install
```
npm install htmlsanitize
```## Usage
```javascript
const sanitize = require('htmlsanitize');sanitize('
Hello world!alert("booh!")') //Hello world!
```## License
MIT