# html_sanitize

> This module Sanitizes HTML input, stripping all tags and attributes that aren't whitelisted.HTML sanitization can be used to protect against cross-site scripting (XSS) attacks by sanitizing any HTML code submitted by a user.

Latest version **1.1.3** (published 2015-10-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install html_sanitize
pnpm add html_sanitize
yarn add html_sanitize
bun add html_sanitize
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2015-10-24 |
| First published | 2015-10-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Fazley Kholil |
| Maintainers | fazleykholil |
| Keywords | dummy |

## Links

- npm: https://www.npmjs.com/package/html_sanitize
- Repository: https://github.com/fazleyKholil/node_module
- Homepage: https://github.com/fazleyKholil/node_module#readme
- Issues: https://github.com/fazleyKholil/node_module/issues
- npm.io page: https://npm.io/package/html_sanitize

## Recent versions

- 1.1.3 (latest) — 2015-10-24
- 1.1.1 — 2015-10-24
- 0.1.1 — 2015-10-24
- 0.1.0 — 2015-10-24

## README

html_sanitize
=========

A small library providing utility methods to `escape` and `unescape` HTML entities

## Installation

  npm install html_sanitize --save

## Usage

  var html_sanitize = require('html_sanitize')
      escape = html_sanitize.escape,
      unescape = html_sanitize.unescape;

  var html = '<h1>Hello World</h1>',
      escaped = escape(html),
      unescaped = unescape(escaped);

  console.log('html', html, 'escaped', escaped, 'unescaped', unescaped);

## Tests

  npm test

## Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style.
Add unit tests for any new or changed functionality. Lint and test your code.

## Release History

* 1.1.2 Initial release

---
_Source: https://npm.io/package/html_sanitize · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
