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

13
12

2.7.2

Diff

Changelog

Source

2.7.2 (2022-09-15)

  • Closing tags must agree with opening tags. This fixes issue #549, in which closing tags not associated with any permitted opening tag could be passed through. No known exploit exists, but it's better not to permit this. Thanks to Kedar Chandrayan for the report and the fix.
boutell
published 2.7.1 •

Changelog

Source

2.7.1 (2022-07-20)

  • Protocol-relative URLs are properly supported for script tags. Thanks to paweljq.
  • A denial-of-service vulnerability has been fixed by replacing global regular expression replacement logic for comment removal with a new implementation. Thanks to Nariyoshi Chida of NTT Security Japan for pointing out the issue.
boutell
published 2.7.0 •

Changelog

Source

2.7.0 (2022-02-04)

  • Allows a more sensible set of default attributes on <img /> tags. Thanks to Zade Viggers.
boutell
published 2.6.1 •

Changelog

Source

2.6.1 (2021-12-08)

  • Fixes style filtering to retain !important when used.
  • Fixed trailing text bug on transformTags options that was reported on issue #506. Thanks to Alex Rantos.
alexbea
published 2.6.0 •

Changelog

Source

2.6.0 (2021-11-23)

  • Support for regular expressions in the allowedClasses option. Thanks to Alex Rantos.
boutell
published 2.5.3 •

Changelog

Source

2.5.3 (2021-11-02):

  • Fixed bug introduced by klona 2.0.5, by removing klona entirely.
alexbea
published 2.5.2 •

Changelog

Source

2.5.2 (2021-10-13):

  • Nullish HTML input now returns an empty string. Nullish value may be explicit null, undefined or implicit undefined when value is not provided. Thanks to Artem Kostiuk for the contribution.
  • Documented that all text content is escaped. Thanks to Siddharth Singh.
boutell
published 2.5.1 •

Changelog

Source

2.5.1 (2021-09-14):

  • The allowedScriptHostnames and allowedScriptDomains options now implicitly purge the inline content of all script tags, not just those with src attributes. This behavior was already strongly implied by the fact that they purged it in the case where a src attribute was actually present, and is necessary for the feature to provide any real security. Thanks to Grigorii Duca for pointing out the issue.
alexbea
published 2.5.0 •

Changelog

Source

2.5.0 (2021-09-08):

  • New allowedScriptHostnames option, it enables you to specify which hostnames are allowed in a script tag.
  • New allowedScriptDomains option, it enables you to specify which domains are allowed in a script tag. Thank you to Yorick Girard for this and the allowedScriptHostnames contribution.
  • Updates whitelist to allowlist.
alexbea
published 2.4.0 •

Changelog

Source

2.4.0 (2021-05-19):

  • Added support for class names with wildcards in allowedClasses. Thanks to zhangbenber for the contribution.
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