Socket
Socket
Sign inDemoInstall

sanitize-html

Package Overview
Dependencies
Maintainers
8
Versions
113
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

1.11.4

Diff

Changelog

Source

1.11.4:

fixed crash when __proto__ is a tag name. Now using a safe check for the existence of properties in all cases. Thanks to Andrew Krasichkov.

Fixed XSS attack vector via textarea tags (when explicitly allowed). Decided that script (obviously) and style (due to its own XSS vectors) cannot realistically be afforded any XSS protection if allowed, unless we add a full CSS parser. Thanks again to Andrew Krasichkov.

boutell
published 1.11.3 •

Changelog

Source

1.11.3:

bumped htmlparser2 version to address crashing bug in older version. Thanks to e-jigsaw.

boutell
published 1.11.2 •

Changelog

Source

1.11.2:

fixed README typo that interfered with readability due to markdown issues. No code changes. Thanks to Mikael Korpela. Also improved code block highlighting in README. Thanks to Alex Siman.

boutell
published 1.11.1 •

Changelog

Source

1.11.1:

fixed a regression introduced in 1.11.0 which caused the closing tag of the parent of a textarea tag to be lost. Thanks to Stefano Sala, who contributed the missing test.

boutell
published 1.11.0 •

Changelog

Source

1.11.0:

added the nonTextTags option, with tests.

boutell
published 1.10.1 •

Changelog

Source

1.10.1:

documentation cleanup. No code changes. Thanks to Rex Schrader.

boutell
published 1.10.0 •

Changelog

Source

1.10.0:

allowedAttributes now allows you to allow attributes for all tags by specifying * as the tag name. Thanks to Zdravko Georgiev.

boutell
published 1.9.0 •

Changelog

Source

1.9.0:

parser option allows options to be passed directly to htmlparser. Thanks to Danny Scott.

boutell
published 1.8.0 •

Changelog

Source

1.8.0:

  • transformTags now accepts the * wildcard to transform all tags. Thanks to Jamy Timmermans.

  • Text that has been modified by transformTags is then passed through textFilter. Thanks to Pavlo Yurichuk.

  • Content inside textarea is discarded if textarea is not allowed. I don't know why it took me this long to see that this is just common sense. Thanks to David Frank.

boutell
published 1.7.2 •

Changelog

Source

1.7.2:

removed array-includes dependency in favor of indexOf, which is a little more verbose but slightly faster and doesn't require a shim. Thanks again to Joseph Dykstra.

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