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

sanitize-html

Package Overview
Dependencies
Maintainers
17
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sanitize-html - npm Package Versions

1
12

2.3.3

Diff

Changelog

Source

2.3.3 (2021-03-19):

  • Security fix: allowedSchemes and related options did not properly block schemes containing a hyphen, plus sign, period or digit, such as ms-calculator:. Thanks to Lukas Euler for pointing out the issue.
  • Added a security note about the known risks associated with using the parser option, especially decodeEntities: false. See the documentation.
boutell
published 2.3.2 •

Changelog

Source

2.3.2 (2021-01-26):

  • Additional fixes for iframe validation exploits. Prevent exploits based on browsers' tolerance of the use of "" rather than "/" and the presence of whitespace at this point in the URL. Thanks to Ron Masas of Checkmarx for pointing out the issue and writing unit tests.
  • Updates README yarn add syntax. Thanks to Tagir Khadshiev for the contribution.
boutell
published 2.3.1 •

Changelog

Source

2.3.1 (2021-01-22):

  • Uses the standard WHATWG URL parser to stop IDNA (Internationalized Domain Name) attacks on the iframe hostname validator. Thanks to Ron Masas of Checkmarx for pointing out the issue and suggesting the use of the WHATWG parser.
alexbea
published 2.3.0 •

Changelog

Source

2.3.0 (2020-12-16):

  • Upgrades htmlparser2 to new major version ^6.0.0. Thanks to Bogdan Chadkin for the contribution.
alexbea
published 2.2.0 •

Changelog

Source

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 for this contribution.
alexbea
published 2.1.2 •

Changelog

Source

2.1.2 (2020-11-04):

  • Fixes typos and inconsistencies in the README. Thanks to Eric Lefevre-Ardant for this contribution.
alexbea
published 2.1.1 •

Changelog

Source

2.1.1 (2020-10-21):

  • Fixes a bug when using allowedClasses with an '*' wildcard selector. Thanks to Clemens Damke for this contribution.
  • Updates mocha to 7.x to resolve security warnings.
alexbea
published 2.1.0 •

Changelog

Source

2.1.0 (2020-10-07):

  • sup added to the default allowed tags list. Thanks to Julian Lam for the contribution.
  • Updates default allowedTags README documentation. Thanks to Marco Arduini for the contribution.
alexbea
published 2.0.0 •

Changelog

Source

2.0.0 (2020-09-23):

  • nestingLimit option added.
  • Updates ESLint config package and fixes warnings.
  • Upgrade is-plain-object package with named export. Thanks to Bogdan Chadkin for the contribution.
  • Upgrade postcss package and drop Node 11 and Node 13 support (enforced by postcss).

Backwards compatibility breaks:

  • There is no build. You should no longer directly link to a sanitize-html file directly in the browser as it is using modern Javascript that is not fully supported by all major browsers (depending on your definition). You should now include sanitize-html in your project build for this purpose if you have one.
  • On the server side, Node.js 10 or higher is required.
  • The default allowedTags array was updated significantly. This mostly added HTML tags to be more comprehensive by default. You should review your projects and consider the allowedTags defaults if you are not already overriding them.
alexbea
published 1.27.5 •

Changelog

Source

1.27.5 (2020-09-23):

  • Updates README to include ES modules syntax.
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