Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sanitize-html

Package Overview
Dependencies
Maintainers
15
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sanitize-html - npm Package Compare versions

Comparing version 2.1.2 to 2.2.0

4

CHANGELOG.md
# Changelog
## 2.2.0 (2020-12-02):
- Adds a note to the README about Typescript support (or the lack-thereof).
- Adds `tel` to the default `allowedSchemes`. Thanks to [Arne Herbots](https://github.com/aHerbots) for this contribution.
## 2.1.2 (2020-11-04):

@@ -4,0 +8,0 @@ - Fixes typos and inconsistencies in the README. Thanks to [Eric Lefevre-Ardant](https://github.com/elefevre) for this contribution.

2

index.js

@@ -713,3 +713,3 @@ const htmlparser = require('htmlparser2');

// URL schemes we permit
allowedSchemes: [ 'http', 'https', 'ftp', 'mailto' ],
allowedSchemes: [ 'http', 'https', 'ftp', 'mailto', 'tel' ],
allowedSchemesByTag: {},

@@ -716,0 +716,0 @@ allowedSchemesAppliedToAttributes: [ 'href', 'src', 'cite' ],

{
"name": "sanitize-html",
"version": "2.1.2",
"version": "2.2.0",
"description": "Clean up user-submitted HTML, preserving whitelisted elements and whitelisted attributes on a per-element basis",

@@ -5,0 +5,0 @@ "sideEffects": false,

@@ -29,2 +29,6 @@ # sanitize-html

### Regarding Typescript
sanitize-html is not written in Typescript and there is no plan to directly support it. There is a community supported implementation, [`@types/sanitize-html`](https://www.npmjs.com/package/@types/sanitize-html), however. Any questions or problems while using that implementation should be directed to its maintainers as directed by that project's contribution guidelines.
## How to use

@@ -122,3 +126,3 @@

// URL schemes we permit
allowedSchemes: [ 'http', 'https', 'ftp', 'mailto' ],
allowedSchemes: [ 'http', 'https', 'ftp', 'mailto', 'tel' ],
allowedSchemesByTag: {},

@@ -125,0 +129,0 @@ allowedSchemesAppliedToAttributes: [ 'href', 'src', 'cite' ],

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc