{"_id":"vue-sanitize-directive","_rev":"3-17c2d05320383bca3b9401a1515a827d","name":"vue-sanitize-directive","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"vue-sanitize-directive","version":"0.1.0","description":"Vue directive for HTML sanitization.","keywords":["vue","sanitization","sanitize","v-sanitize"],"main":"dist/index.js","module":"src/index.js","scripts":{"build":"npx webpack --config webpack.config.js","test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Leonardo Piccioni de Almeida"},"license":"ISC","dependencies":{"sanitize-html":"^1.17.0"},"devDependencies":{"webpack":"^4.8.3","webpack-cli":"^2.1.3"},"directories":{"doc":"docs"},"repository":{"type":"git","url":"git+https://github.com/leopiccionia/vue-sanitize-directive.git"},"bugs":{"url":"https://github.com/leopiccionia/vue-sanitize-directive/issues"},"homepage":"https://leopiccionia.github.io/vue-sanitize-directive","gitHead":"ff8af4b9bc2b945b1e47c841812ea505eed9213f","_id":"vue-sanitize-directive@0.1.0","_npmVersion":"6.0.1","_nodeVersion":"9.4.0","_npmUser":{"name":"leopiccionia","email":"leopiccionia@gmail.com"},"dist":{"integrity":"sha512-bCJ31RlLzOL7E/dmiSii5z/Bx5E7s0t+Lj6SAzgFzMi+cw5tK6SQ+sXQHnYUqIVBMgZ4Q6lEE6y42dW/uEWosA==","shasum":"2818e86fd6c56b937ffd26a5475b9ec366bdd675","tarball":"https://registry.npmjs.org/vue-sanitize-directive/-/vue-sanitize-directive-0.1.0.tgz","fileCount":14,"unpackedSize":2329174,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbAHKHCRA9TVsSAnZWagAARx8P/RqnQJVjL/hF9wnnt3ci\nlMP9Lkjf6keff9Def6A9tVKDOyMO41KDuj+0FQ3eWzt73NbfdUjTObTaMNLr\nXD5IB3hSkTzncoyenJkBLfw0U5V69NpJdKVhnSy7Rj824eQSnw0qPefK2KXy\nzePiqS7FxhpX3zq2WihPpRKCrV18rFK3FRL/uNMXhJUPArzurelddsiJ2pki\nZBb5ydCwFpYJZyZr10tvnZfm4VXbvH/dNNbsmoS3wPDKe8rHWwvTM/J+F+W9\nk5XXUMHJ0sDqpPxOMhc2I37NMKV6yU9PO5vvYhjILIVu1UZuTYCUupuqIkGt\nv1cjJtJ1bohrdBGC5HVcDRTi5tzokADwCyqIGp9IPj7K4sKL+OjPyaPL4ySa\nUHAOK2wnyPa7C341teq6UcWttQNsBh4GrQzAB62YmOHDhJQmH8lzC0QF+7tQ\nz7WK4dP2CZ6z7LgHvAxf+sHEo+q2tdoBwl5fjrR4waNWJP4xHCIY6+v9ygjA\nn7d8AhHf0ePoNEhq8gOBFxMF3GsXVtg1xRABj7d+l8gZyziApC8+VspKT34K\nkblwjuljRTB5VmM/6gy0sW6CfNzhx+uvhKgfCcL0nPZRwW9ex1DQB4U+qFtS\ntbXt/sT0bTO4r1Rlh5elU8dLX9KypfNgksAEFqrmqBwKVMKIb91RtWPf4OTj\nqkCF\r\n=fIuQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRAj3aQ19QcJct/5RHp8EnIjxTBjKmn8rM1WeCc+4t+AIhAO3QDv3KkKtZ2hCNgG/1rDmd1ZFM84ZXclyQoUKjqByG"}]},"maintainers":[{"name":"leopiccionia","email":"leopiccionia@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-sanitize-directive_0.1.0_1526755974310_0.3255061439265132"},"_hasShrinkwrap":false},"0.2.0":{"name":"vue-sanitize-directive","version":"0.2.0","description":"Vue directive for HTML sanitization.","author":{"name":"Leonardo Piccioni de Almeida","email":"leopiccionia@gmail.com"},"keywords":["vue","sanitization","sanitize","v-sanitize"],"main":"dist/vue-sanitize-directive.umd.js","module":"dist/vue-sanitize-directive.esm.js","exports":{".":{"import":"./dist/vue-sanitize-directive.esm.js","require":"./dist/vue-sanitize-directive.umd.js"}},"scripts":{"build":"rollup -c","test":"echo \"Error: no test specified\" && exit 1"},"license":"MIT","dependencies":{"sanitize-html":"^2.7.0"},"devDependencies":{"@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.3","esbuild":"^0.14.21","rollup":"^2.67.2","rollup-plugin-esbuild":"^4.8.2","rollup-plugin-terser":"^7.0.2"},"directories":{"doc":"docs"},"repository":{"type":"git","url":"git+https://github.com/leopiccionia/vue-sanitize-directive.git"},"bugs":{"url":"https://github.com/leopiccionia/vue-sanitize-directive/issues"},"homepage":"https://leopiccionia.github.io/vue-sanitize-directive","gitHead":"c344e4d72327640a8b743a6cc4b0ce1691bace4b","_id":"vue-sanitize-directive@0.2.0","_nodeVersion":"12.22.10","_npmVersion":"6.14.16","dist":{"integrity":"sha512-RKmQbp4pmoU5Opqdvgew5zbaQBtszQHbdN1TBqg879Y7AM28ZIhcUCveVQ+42e0NDLv3SZj3WKGqYU0j3Zq7sA==","shasum":"06767e2761c2cdfa42a4155689a66014547864d0","tarball":"https://registry.npmjs.org/vue-sanitize-directive/-/vue-sanitize-directive-0.2.0.tgz","fileCount":13,"unpackedSize":522455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBtzdCRA9TVsSAnZWagAAUCMQAJQLQOkWSbRNaqakiikw\ng/JIzArU93LS/wyLAqohKZ5ukzrETnh45Zllot0ObytCWYP+Cn2gce/V7eJR\nxwiIH6zVi1bD30NPS5dBMQbdEPuZR13AfUjh04KJz9uCmLkFhp7JrcHgdjGb\nVuGPo3qKDHC9kNUnH+ue+ne4GBM+h1V+TJkDLF+srLZXz7JTO69xZEjYYWNR\nGQDNKaMjz4TmKgFaWT4igMKg1oAJR6z8W4IqbUnZGu8GmNhLLmA+wZkc7XOV\no/STSvST/pGLEYq8xFxGeRYiwxXa6fwZTUimjtwMfMTYY25q7cFmHKxiDaSF\n+vSAV5t8++lKiKsFqkF9znqrS92hZMYZNjCvP4BYTPh+N9huPQxmpxvHD+fM\n+09PC7Al4pBySSkdeV3ft3Xe0Fyuw3s8zAk86eYEyQE+bRdOkdZh89V6YrXm\nPIGKUTteqyyIwxc1n/vM8t8fTvdr7I7C/3rS8mRZK8Y3ZQjTGz/80iF03LYf\nrcUxLSlur3RM91Fz5cW23MrJgvrTbhptGWjVmapfVeb/+GILtXrDf7OhQxzk\nJAFNYvBkyn96U/qmoswRLq0Sn4jyhlzd0dIAFif9XiS/AmxBFWM1VItp6zP5\nmLbR8nlar5YFE1+dTIZSHtG8VXeEbXnT8ML0oTKkc4BiKLbgrKyse0YdCamr\nWkli\r\n=Mqd1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBwhiL0mBDW7HR3yXD2XolMW8EW/qVvJag5+VE7B6sCPAiEA/cUAUL1ZQxZp2iZKettW56y6aVXGpYb0VtAkvtuBEfc="}]},"_npmUser":{"name":"leopiccionia","email":"leopiccionia@gmail.com"},"maintainers":[{"name":"leopiccionia","email":"leopiccionia@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-sanitize-directive_0.2.0_1644616925001_0.4449900455267428"},"_hasShrinkwrap":false},"0.2.1":{"name":"vue-sanitize-directive","version":"0.2.1","description":"Vue directive for HTML sanitization.","author":{"name":"Leonardo Piccioni de Almeida","email":"leopiccionia@gmail.com"},"keywords":["vue","sanitization","sanitize","v-sanitize"],"main":"dist/vue-sanitize-directive.umd.js","module":"dist/vue-sanitize-directive.esm.js","exports":{".":{"import":"./dist/vue-sanitize-directive.esm.js","require":"./dist/vue-sanitize-directive.umd.js"}},"scripts":{"build":"vite build"},"license":"MIT","dependencies":{"sanitize-html":"^2.7.1"},"devDependencies":{"vite":"^3.0.4"},"directories":{"doc":"docs"},"repository":{"type":"git","url":"git+https://github.com/leopiccionia/vue-sanitize-directive.git"},"bugs":{"url":"https://github.com/leopiccionia/vue-sanitize-directive/issues"},"homepage":"https://leopiccionia.github.io/vue-sanitize-directive","gitHead":"0330dd3d91754a2e72fbac64f72e638ed2d1ee13","_id":"vue-sanitize-directive@0.2.1","_nodeVersion":"18.0.0","_npmVersion":"8.6.0","dist":{"integrity":"sha512-yxs4xhx4bRTURdJIq+YjBn3X8XaqKAPuYgwCBnDdsbRm6bjtfFFwq6CHwDnU3Hxp7e4Sz7GKp0ve0qt/kCpdgA==","shasum":"a34d02f3406b5ce0f32dac53a747a25067652125","tarball":"https://registry.npmjs.org/vue-sanitize-directive/-/vue-sanitize-directive-0.2.1.tgz","fileCount":12,"unpackedSize":610158,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWiL8hoE81xWuiVeSMy7pCiRm05n7enjPIi27QkfgK1AIgM6xN9ixWuwYpuk4XB5iYIidlECbovZkuBsYvWanRRxo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5/xGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpbLg//cCW2DNgPbe0QrqBZdnavAoru8UMIJTEaJUm/ZFINb5KzFW37\r\nGT59FxDjw5Nz6Q2SXvh79q7ih8I8LzPTMT1Q5uR3wbiGYbYOSLdwodE1nwqs\r\nQtCE+r0uG88dVsKWjwd0gZ+w4NR+UCRTnIhID1kShNbkORCTv/55rRyVE8Su\r\nDao9BxfyZ5slxmyMEV68zoqKMJV6gKmxJSldGcfY3WooWZmvGw0rH7o2XHVd\r\nxaylLPAieyRardbVseZltjF1lKYUP1Ti+FWMco95Hqzrs9RtL9wrHlG2uAX9\r\nIjnofuW0bk3WG7BFYUZwplRlg4CwCuKhz76f/+nDo6QfpkNXaH9aW0mSZxJl\r\nc7D2CuIiv06qd4AnHF6EOltdlb4FFCnTdJUtDSkY4LR04eQ4FJapzBgqomRe\r\n69i+MHL3EqfiGU0VLZd1lU1xFUJ0ILtSxGI53kF548fLMwVoy8q16vlZ6FSC\r\nz0gI5eT8S3qA2hCran7O/yeAdkM8avfiyQG1lugCMsGxrpG20TZcUM/H8xKJ\r\nhfb8LaU4uRx9T2N33s1AkzjbKdukBIwQBn6gEwFMGuvZKHTkeDZ7oJ+1y50m\r\nkf0fG92EUfwEz/ZyLtpsD7XSu61f07cPutXfxjCXI60+eGEyZGyZRtQzboDe\r\n3a/5s6ZBQ+KMfG0wT6R3+0cwBYIMHqs1mJk=\r\n=2hAp\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"leopiccionia","email":"leopiccionia@gmail.com"},"maintainers":[{"name":"leopiccionia","email":"leopiccionia@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-sanitize-directive_0.2.1_1659370565936_0.1283594917316726"},"_hasShrinkwrap":false}},"time":{"created":"2018-05-19T18:52:54.310Z","0.1.0":"2018-05-19T18:52:54.462Z","modified":"2022-08-01T16:16:06.301Z","0.2.0":"2022-02-11T22:02:05.212Z","0.2.1":"2022-08-01T16:16:06.186Z"},"maintainers":[{"name":"leopiccionia","email":"leopiccionia@gmail.com"}],"description":"Vue directive for HTML sanitization.","homepage":"https://leopiccionia.github.io/vue-sanitize-directive","keywords":["vue","sanitization","sanitize","v-sanitize"],"repository":{"type":"git","url":"git+https://github.com/leopiccionia/vue-sanitize-directive.git"},"author":{"name":"Leonardo Piccioni de Almeida","email":"leopiccionia@gmail.com"},"bugs":{"url":"https://github.com/leopiccionia/vue-sanitize-directive/issues"},"license":"MIT","readme":"# v-sanitize\n\n[Vue](https://vuejs.org)'s default `v-text` is HTML-insensitive, while `v-html` doesn't perform sanitization by default.\n\n`v-sanitize` is a Vue directive for HTML sanitization, powered by the flexible [sanitize-html](https://www.npmjs.com/package/sanitize-html). The directive can receive either a string, that will undergo a partial sanitization if no modifier is present, or an array of two elements, the first being a `sanitize-html` allowlist ([know more here](https://github.com/apostrophecms/sanitize-html)) and the second being the string to be sanitized.\n\n```html\n<div v-sanitize=\"unsafe_html\"></div>\n```\n\n## Warning\n\nThe validation and sanitization of user-provided input should be performed on the back-end, before storing it on the database. You should resort to client-side input sanitization only if you don't control the back-end, e.g., consuming content from an external API.\n\n## Setup\n\nStart getting it with NPM or Yarn ([see package](https://www.npmjs.com/package/vue-sanitize-directive)).\n\n```bash\nnpm install vue-sanitize-directive\n```\n\nThen install it like any other Vue plugin. This will provide the `v-sanitize` directive globally.\n\n```js\nimport VueSanitize from 'vue-sanitize-directive'\n\n// Vue 2.x\nVue.use(VueSanitize)\n\n// Vue 3.x\napp.use(VueSanitize)\n```\n\n## Usage ([**demos**](https://leopiccionia.github.io/vue-sanitize-directive))\n\n### Strip all tags (`.strip` modifier)\n\nRemoves all HTML tags, keeping just the text content.\n\n```html\n<span v-sanitize.strip=\"unsafe_html\"></span>\n```\n\n### Remove unsafe tags (default/ `.basic` modifier)\n\nAllows some HTML tags, but remove unsafe content, like `<script/>` and `<iframe/>` tags.\n\n```html\n<span v-sanitize.basic=\"unsafe_html\"></span> = <span v-sanitize=\"unsafe_html\"></span>\n```\n\n### Keep inline styles (`.inline` modifier)\n\nRemoves most tags, keeping only inline formatting and `<br/>` tags.\n\n```html\n<span v-sanitize.inline=\"unsafe_html\"></span>\n```\n\n### Allow all tags (`.nothing` modifier)\n\nAllows all HTML tags, not performing sanitization. For all effects, it's a replacement for `v-html`.\n\n```html\n<span v-sanitize.nothing=\"unsafe_html\"></span>\n```\n","readmeFilename":"README.md"}