New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-sanitized-html

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-sanitized-html - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

lib/index.js

35

package.json
{
"name": "react-sanitized-html",
"version": "1.0.0",
"version": "2.0.0",
"description": "A React component that will sanitize user-inputted HTML code, using the popular sanitize-html package",
"main": "index.js",
"main": "lib/index.js",
"module": "lib/index.js",
"files": [
"lib/*"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"build": "babel ./src --out-dir ./lib --source-maps",
"prepare": "rimraf lib && npm run build",
"test": "jest"
},
"repository": {
"type": "git",
"url": "git+https://github.com/compulim/react-sanitize-html.git"
"url": "git+https://github.com/compulim/react-sanitized-html.git"
},

@@ -22,9 +28,22 @@ "keywords": [

"bugs": {
"url": "https://github.com/compulim/react-sanitize-html/issues"
"url": "https://github.com/compulim/react-sanitized-html/issues"
},
"homepage": "https://github.com/compulim/react-sanitize-html#readme",
"homepage": "https://github.com/compulim/react-sanitized-html#readme",
"peerDependencies": {
"react": "^15.4.2",
"sanitize-html": "^1.14.1"
"prop-types": "^15.6.0",
"react": "^16.2.0",
"sanitize-html": "^1.16.1"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-jest": "^21.2.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-es2017": "^6.24.1",
"babel-preset-react": "^6.24.1",
"jest": "^21.2.1",
"react-dom": "^16.2.0",
"regenerator-runtime": "^0.11.1",
"rimraf": "^2.6.2"
}
}
# react-sanitized-html
[![npm version](https://badge.fury.io/js/react-sanitized-html.svg)](https://npmjs.com/package/react-sanitized-html) [![Node.js dependencies](https://david-dm.org/compulim/react-sanitized-html.svg)](https://david-dm.org/compulim/react-sanitized-html) [![npm downloads](https://img.shields.io/npm/dm/react-sanitized-html.svg)](https://npmjs.com/package/react-sanitized-html)
A React component that will sanitize user-inputted HTML code, using the popular [`sanitize-html`](https://npmjs.com/package/sanitize-html) package.

@@ -11,2 +13,6 @@

> Because both [`htmlparser2`](https://npmjs.com/packages/htmlparser2) and [`domhandler`](https://npmjs.com/packages/domhandler) (dependencies of [`sanitize-html`](https://npmjs.com/packages/sanitize-html)) requires [ES2015 Property Accessors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Property_Accessors) for shorthanded properties. Thus, this component cannot be used in IE8.
> In [`sanitize-html@1.14.1`](https://npmjs.com/packages/sanitize-html), shorthands are not used. Thus, it is possible to build a workaround for IE8 by customizing both [`htmlparser2`] and [`domhandler`] without shorthands.
# Example usage

@@ -47,2 +53,13 @@

# Development
To setup your development environment, after cloning the repository, run the following steps.
```
npm install react sanitize-html
npm install --only=development
```
Then run `npm test` to run all tests.
# Contribution

@@ -49,0 +66,0 @@

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