{"_id":"react-sanitized-html","_rev":"8-9595dc6f802b98df93cab265baad2c79","name":"react-sanitized-html","description":"A React component that will sanitize user-inputted HTML code, using the popular sanitize-html package","dist-tags":{"latest":"2.0.0","master":"2.0.1-master.83ffb42"},"versions":{"1.0.0":{"name":"react-sanitized-html","version":"1.0.0","description":"A React component that will sanitize user-inputted HTML code, using the popular sanitize-html package","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/compulim/react-sanitize-html.git"},"keywords":["sanitize","sanitizer","react","clean"],"author":{"name":"William Wong","email":"compulim@hotmail.com","url":"https://github.com/compulim"},"license":"MIT","bugs":{"url":"https://github.com/compulim/react-sanitize-html/issues"},"homepage":"https://github.com/compulim/react-sanitize-html#readme","peerDependencies":{"react":"^15.4.2","sanitize-html":"^1.14.1"},"gitHead":"051799d2489d957aaddcbe592fbd23470008b96e","_id":"react-sanitized-html@1.0.0","_shasum":"e9db3886ba8d2268b6fb7af95f647d6406484ca3","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"compulim","email":"compulim@hotmail.com"},"dist":{"shasum":"e9db3886ba8d2268b6fb7af95f647d6406484ca3","tarball":"https://registry.npmjs.org/react-sanitized-html/-/react-sanitized-html-1.0.0.tgz","integrity":"sha512-jIiSbV/+4/ubrVuwfZMFtkeoYzyhhCx5cZIxh/6mmH3miEc4yzAm8VeksuT+oiO+Aye++UlP2Q9HwwSYBalYQg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDp9t0FdtEdclrOhrC0TEtQVT5AXKnDC9eQwcccwFetyAiBP+jvwJtdNEhy6bAlJL8xzGSefM+N4OhK3CahSgvALtg=="}]},"maintainers":[{"name":"compulim","email":"compulim@hotmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/react-sanitized-html-1.0.0.tgz_1488895498020_0.6836088136769831"},"directories":{}},"2.0.0":{"name":"react-sanitized-html","version":"2.0.0","description":"A React component that will sanitize user-inputted HTML code, using the popular sanitize-html package","main":"lib/index.js","module":"lib/index.js","files":["lib/*"],"scripts":{"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-sanitized-html.git"},"keywords":["sanitize","sanitizer","react","clean"],"author":{"name":"William Wong","email":"compulim@hotmail.com","url":"https://github.com/compulim"},"license":"MIT","bugs":{"url":"https://github.com/compulim/react-sanitized-html/issues"},"homepage":"https://github.com/compulim/react-sanitized-html#readme","peerDependencies":{"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"},"gitHead":"49363c3f6165be1c42d06cdab8dbe3921993a069","_id":"react-sanitized-html@2.0.0","_npmVersion":"5.5.1","_nodeVersion":"9.2.0","_npmUser":{"name":"compulim","email":"compulim@hotmail.com"},"dist":{"integrity":"sha512-G1n8smzDSqiHoBtvfJqcyvDKXlWTrvARRgWoSKhqeDVxxb9emO4ourS1OYnzV6yxx/G4jLqzaFSx8b6roL29Kw==","shasum":"2ac300ae60e8e7cb28378b1233b9630e415d0241","tarball":"https://registry.npmjs.org/react-sanitized-html/-/react-sanitized-html-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRmgrQpLQzSHvf+q/gm8xtR8omq2mA5jf+y09O1Z+AdQIgdh3ZMFCq8n+29w/Yt/AgiyCb1rkxVYQ9HgRfOl+JI4A="}]},"maintainers":[{"name":"compulim","email":"compulim@hotmail.com"},{"name":"spyip","email":"ping.yip@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-sanitized-html-2.0.0.tgz_1512723022923_0.4397906695958227"},"directories":{}},"2.0.1-master.83ffb42":{"name":"react-sanitized-html","version":"2.0.1-master.83ffb42","description":"A React component that will sanitize user-inputted HTML code, using the popular sanitize-html package","main":"lib/index.js","module":"lib/index.js","scripts":{"build":"babel ./src --out-dir ./lib --source-maps","prepare":"rimraf lib && npm run build","test":"jest","watch":"npm run build -- --watch"},"repository":{"type":"git","url":"git+https://github.com/compulim/react-sanitized-html.git"},"keywords":["sanitize","sanitizer","react","clean"],"author":{"name":"William Wong","email":"compulim@hotmail.com","url":"https://github.com/compulim"},"license":"MIT","bugs":{"url":"https://github.com/compulim/react-sanitized-html/issues"},"homepage":"https://github.com/compulim/react-sanitized-html#readme","peerDependencies":{"prop-types":"^15.6.0","react":"^16.0.0","sanitize-html":"^1.16.1"},"devDependencies":{"@babel/cli":"^7.1.2","@babel/core":"^7.1.2","@babel/plugin-proposal-object-rest-spread":"^7.0.0","@babel/plugin-transform-runtime":"^7.1.0","@babel/preset-env":"^7.1.0","@babel/preset-react":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","jest":"^23.6.0","prop-types":"^15.6.0","react":"^16.0.0","react-dom":"^16.2.0","rimraf":"^2.6.2","sanitize-html":"^1.16.1"},"gitHead":"a0f6c7af63b1e74500b462201e8e9c97361ecdd1","readme":"# react-sanitized-html\n\n[![npm version](https://badge.fury.io/js/react-sanitized-html.svg)](https://npmjs.com/package/react-sanitized-html) [![Build Status](https://travis-ci.org/compulim/react-sanitized-html.svg?branch=master)](https://travis-ci.org/compulim/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)\n\nA React component that will sanitize user-inputted HTML code, using the popular [`sanitize-html`](https://npmjs.com/package/sanitize-html) package.\n\n# Install\n\nThis React component requires both [`react`](https://npmjs.com/package/react) and [`sanitize-html`](https://npmjs.com/package/sanitize-html) to be installed to work. We marked both as peer dependency so you could use the version of React as it fit.\n\nRun `npm install react-sanitized-html sanitize-html --save` to install this package.\n\n> 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.\n\n> 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.\n\n# Example usage\n\n```jsx\nimport SanitizedHTML from 'react-sanitized-html';\n\nconst HTML_FROM_USER = '<a href=\"http://bing.com/\">Bing</a>';\n\nReactDOM.render(\n  <SanitizedHTML html={ HTML_FROM_USER } />,\n  document.getElementById('reactRoot')\n);\n```\n\nIt will output as:\n\n```html\n<div>\n  <a href=\"http://bing.com/\">Bing</a>\n</div>\n```\n\n# Options\n\nYou can add [`sanitize-html`](https://npmjs.com/package/sanitize-html) options as props. For example,\n\n```html\n<SanitizedHTML\n  allowedAttributes={{ 'a': ['href'] }}\n  allowedTags={['a']}\n  html={ `<a href=\"http://bing.com/\">Bing</a>` }\n/>\n```\n\nYou can find more options [here](https://npmjs.com/package/sanitize-html).\n\n# Development\n\nTo setup your development environment, after cloning the repository, run the following steps.\n\n```\nnpm install react sanitize-html\nnpm install --only=development\n```\n\nThen run `npm test` to run all tests.\n\n# Contribution\n\nLike us? [Star](https://github.com/compulim/react-sanitized-html/stargazers) us.\n\nFound an issue? [File](https://github.com/compulim/react-sanitized-html/issues) us an issue.\n","readmeFilename":"README.md","_id":"react-sanitized-html@2.0.1-master.83ffb42","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"compulim","email":"compulim@hotmail.com"},"dist":{"integrity":"sha512-OcT8ccfvt2Ul2andVGGV86uBfPvBYfte/ZIzooBeQw/QQ7aXGUZkC1m8zEbSh1zHQFsr4kOuf5TC+8TGGdmpWg==","shasum":"1d75b99c97d8df47f6b2cf9334c16b8d2c5fd40d","tarball":"https://registry.npmjs.org/react-sanitized-html/-/react-sanitized-html-2.0.1-master.83ffb42.tgz","fileCount":6,"unpackedSize":12427,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbu7AACRA9TVsSAnZWagAA6u0QAJMoGDYeu9J0TvNjDGR6\nd0fAcJC9thcWiI3RnVsUPkPBlTAJp9J131E98Zp+J/4P3TTjSIPL61nFWPTm\nu5Ri0V9d/dGIv7GC4U088rXmwBmV9DjhTtnx4LdSAhDGj5Z+zEfCsrsZ/Yeu\nABQiwAiS97tQLWmKDi1YIIWSiDKQ8mYXP8RoOJlGC3XcIMRhoLJT5QcTOn/c\nRsQaW6zL2v7kGmM8Nqor8YkMmEUNjp0KHyzTUSnAufFyujRV+vb3+5B0jHCT\nqZGrwQlnkQbpYh+xjLaXbz5ldbAjL0XjDagw6Ny/EnQJDwWTFeDReI+Uzd5L\n9iikhkaOY0fVQ4Fne9/oRRNB6qnX93uoYlwPgVcQYzB/n3/9fMo6aFuVh8Bu\nWPDu04lckoo3xmqY4mvrntAQb0T3dJrpzXsJQ3W93aodd/6vcH/jyRoqWi+V\nJVeqGiEi4Tb0Am5Uo9RY5aXUR2ArTwvsKSqhL+tUktTJcHuHVpNfC3NCL/PZ\nTHBMc0b2sEt37W619OzG/v+W/nAdLsyBDTdWJAm5072r1gK15DnHC5OUHSSa\nXrT28ap7ChECUCB8a6L9bNvQMpHdDOS2ob+MbEjbPXvm6i3NlB1+UJUd/oXz\nxpzh91O2S+O2Ozv3IhD6x4VRmHA6HSKjg9oEFBiQwwsYwjAtyzYHnAWrpG+1\n5Bny\r\n=zhLC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD22O+jYJ0FGgjwVJSuAbX1V4sRfaTXorXQWKrJGWotvgIhAPYyAxoFZrqjYmLcSyJJM4v035TRU2+5hgVWOJZhesDQ"}]},"maintainers":[{"name":"compulim","email":"compulim@hotmail.com"},{"name":"spyip","email":"ping.yip@hotmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-sanitized-html_2.0.1-master.83ffb42_1539026943081_0.2599818341800977"},"_hasShrinkwrap":false}},"readme":"","maintainers":[{"name":"compulim","email":"compulim@hotmail.com"},{"name":"spyip","email":"ping.yip@hotmail.com"}],"time":{"modified":"2022-06-26T08:03:05.579Z","created":"2017-03-07T14:04:59.824Z","1.0.0":"2017-03-07T14:04:59.824Z","2.0.0":"2017-12-08T08:50:23.939Z","2.0.1-master.83ffb42":"2018-10-08T19:29:03.284Z"},"homepage":"https://github.com/compulim/react-sanitized-html#readme","keywords":["sanitize","sanitizer","react","clean"],"repository":{"type":"git","url":"git+https://github.com/compulim/react-sanitized-html.git"},"author":{"name":"William Wong","email":"compulim@hotmail.com","url":"https://github.com/compulim"},"bugs":{"url":"https://github.com/compulim/react-sanitized-html/issues"},"license":"MIT","readmeFilename":"","users":{"compulim":true,"spyip":true}}