react-sanitized-html
Advanced tools
Comparing version 1.0.0 to 2.0.0
{ | ||
"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 | ||
[](https://npmjs.com/package/react-sanitized-html) [](https://david-dm.org/compulim/react-sanitized-html) [](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 @@ |
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
13744
67
1
0
68
3
10