Socket
Socket
Sign inDemoInstall

sanitize-html

Package Overview
Dependencies
Maintainers
15
Versions
113
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 1.22.1 to 1.23.0

5

CHANGELOG.md
## Changelog
1.23.0:
- Adds eslint configuration and adds eslint to test script.
- Sets `sideEffects: false` on package.json to allow module bundlers like webpack tree-shake this module and all the dependencies from client build. Thanks to [Egor Voronov](https://github.com/egorvoronov) for the contribution.
- Adds the `tagName` (HTML element name) as a second parameter passed to `textFilter`. Thanks to [Slava](https://github.com/slavaGanzin) for the contribution.
1.22.1: Increases the patch version of `lodash.mergewith` to enforce an audit fix.

@@ -4,0 +9,0 @@

22

package.json
{
"name": "sanitize-html",
"version": "1.22.1",
"version": "1.23.0",
"description": "Clean up user-submitted HTML, preserving whitelisted elements and whitelisted attributes on a per-element basis",
"sideEffects": false,
"main": "dist/sanitize-html.js",

@@ -13,7 +14,7 @@ "files": [

"prepublishOnly": "npm run minify",
"test": "npm run prepublishOnly && mocha test/test.js"
"test": "npx eslint . && npm run prepublishOnly && mocha test/test.js"
},
"repository": {
"type": "git",
"url": "https://github.com/punkave/sanitize-html.git"
"url": "https://github.com/apostrophecms/sanitize-html.git"
},

@@ -24,7 +25,5 @@ "keywords": [

"sanitizer",
"html",
"sanitizer",
"apostrophe"
"apostrophecms"
],
"author": "P'unk Avenue LLC",
"author": "Apostrophe Technologies, Inc.",
"license": "MIT",

@@ -49,5 +48,12 @@ "dependencies": {

"browserify": "^16.2.3",
"eslint": "^4.0.0",
"eslint-config-apostrophe": "^3.1.0",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.13.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.8.0",
"eslint-plugin-standard": "^3.1.0",
"mocha": "^5.2.0",
"uglify-js": "^3.8.0"
}
}
}
# sanitize-html
[![CircleCI](https://circleci.com/gh/punkave/sanitize-html/tree/master.svg?style=svg)](https://circleci.com/gh/punkave/sanitize-html/tree/master)
[![CircleCI](https://circleci.com/gh/apostrophecms/sanitize-html/tree/master.svg?style=svg)](https://circleci.com/gh/apostrophecms/sanitize-html/tree/master)
<a href="https://apostrophecms.org/"><img src="https://raw.github.com/punkave/sanitize-html/master/logos/logo-box-madefor.png" align="right" /></a>
<a href="https://apostrophecms.com/"><img src="https://raw.github.com/apostrophecms/sanitize-html/master/logos/logo-box-madefor.png" align="right" /></a>

@@ -321,3 +321,5 @@ `sanitize-html` provides a simple HTML sanitizer with a clear API.

{
textFilter: function(text) {
textFilter: function(text, tagName) {
if (['a'].indexOf(tagName) > -1) return //Skip anchor tags
return text.replace(/\.\.\./, '&hellip;');

@@ -519,8 +521,8 @@ }

[The changelog is now in a separate file for readability.](https://github.com/punkave/sanitize-html/blob/master/CHANGELOG.md)
[The changelog is now in a separate file for readability.](https://github.com/apostrophecms/sanitize-html/blob/master/CHANGELOG.md)
## Support
Feel free to open issues on [github](http://github.com/punkave/sanitize-html).
Feel free to open issues on [github](http://github.com/apostrophecms/sanitize-html).
<a href="http://punkave.com/"><img src="https://raw.github.com/punkave/sanitize-html/master/logos/logo-box-builtby.png" /></a>
<a href="http://apostrophecms.com/"><img src="https://raw.github.com/apostrophecms/sanitize-html/master/logos/logo-box-builtby.png" /></a>

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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