{"name":"@braintree/sanitize-url","version":"4.0.1","keywords":[],"author":"","license":"MIT","_id":"@braintree/sanitize-url@4.0.1","homepage":"https://github.com/braintree/sanitize-url#readme","bugs":{"url":"https://github.com/braintree/sanitize-url/issues"},"dist":{"shasum":"16e719eba72693f95989c05f2b3b424f2aabc5b0","tarball":"http://registry-npm.ywwl.com/@braintree/sanitize-url/download/@braintree/sanitize-url-4.0.1.tgz","fileCount":10,"integrity":"sha512-THIQtVN491hY2rTZ/h5boj0CwDKrZQIUnfaj6RbpGwRJKfmEIgNpgcCJC3KZl1Vux9bQmdE2P4Q7cYUoSUQ4MA==","signatures":[{"sig":"MEQCIB3RMm2H/ND99+OEeFUFf482Ql9pe1YZLkvdbxm4KC09AiBL388oJW4HJNt83/aG1cUxa+XnK8vLCmzfQOJFBeo67g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJei4xqCRA9TVsSAnZWagAAV3sQAKEzORIk8dAtGOUuPays\nxvj4xQRCj8ns70hYn+4ROyqFkWS7HoiHwx5NiaxjbFHI/48DYTjNdxrAsdta\nWF5MlqqPd2yuN+ETUf1bT77UzyMXt01v1aHvgSa1IM3ivVnixDYDRbUj8DCM\nA/I5cnbn2KudcgcVtHBUfJSj+EwiLHEBhgE4wrWAuk1oEA/Qi53i3TSmi+Nl\nxveTJuRmJBaj/xMWl45vALyi8qVvvfXANQEuurVdAxApPfjpstwEoOI2+Gs+\n/yV0tiH2WeeAHHZma+wDQZ5HRC551pPEWWUe8tNIZxQqVOkyLA9//yex3CcP\n3e59GCnpCEdG40CUMbRHgbGYFkJgiYb8hJ3lwQRyKie16Q90rypCqZb8KFW9\n3h7R6iLptZnBxSvFzhTIq3OXjUq3YHsoqtr/VDJoTRTLAM0g9kdXRrHY2Ms8\nBc6Slx6C4ttW45Ler0gqDjffWANZKRs4PLzXYejVH3zrHGVBMmnHFgf4Ph76\nBjYllcYKJcBQv+TwLpN4cPNtSVpyy4C6HvGnFgq4OfDtP4b5pYBG9w23HCh5\n3UvrQLoxr5m6rT2yVKePF5v3zaB1o8Fa6Auv+dy++WC4MEV6Bn4F774z0+Vm\nyl/5IQGAplOfihgNIiLERaOtjzZEUJ03nWVnkMHF5quw0eVxANTH0ndCdm2F\nbn3G\r\n=ozGf\r\n-----END PGP SIGNATURE-----\r\n","size":3552,"noattachment":false,"key":"/@braintree/sanitize-url/-/@braintree/sanitize-url-4.0.1.tgz"},"main":"index.js","gitHead":"d11d8424c78acfd424470e27fc5e9b5b7f92ca65","scripts":{"lint":"eslint .","test":"mocha","pretest":"npm run lint"},"_npmUser":{"name":"braintree","email":"team-sdk@getbraintree.com"},"deprecated":"Potential XSS vulnerability patched in v6.0.0.","repository":{"url":"git+https://github.com/braintree/sanitize-url.git","type":"git"},"_npmVersion":"6.13.4","description":"A url sanitizer","directories":{},"_nodeVersion":"12.14.0","_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.0","mocha":"^6.2.0","eslint":"^6.2.2","eslint-config-braintree":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sanitize-url_4.0.1_1586203753313_0.20565784498237338","host":"s3://npm-registry-packages"},"readme":"# sanitize-url\n\n## Installation\n\n```sh\nnpm install -S @braintree/sanitize-url\n```\n\n## Usage\n\n```js\nvar sanitizeUrl = require(\"@braintree/sanitize-url\").sanitizeUrl;\n\nsanitizeUrl(\"https://example.com\"); // 'https://example.com'\nsanitizeUrl(\"http://example.com\"); // 'http://example.com'\nsanitizeUrl(\"www.example.com\"); // 'www.example.com'\nsanitizeUrl(\"mailto:hello@example.com\"); // 'mailto:hello@example.com'\nsanitizeUrl(\n  \"&#104;&#116;&#116;&#112;&#115;&#0000058//&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;\"\n); // https://example.com\n\nsanitizeUrl(\"javascript:alert(document.domain)\"); // 'about:blank'\nsanitizeUrl(\"jAvasCrIPT:alert(document.domain)\"); // 'about:blank'\nsanitizeUrl(decodeURIComponent(\"JaVaScRiP%0at:alert(document.domain)\")); // 'about:blank'\n// HTML encoded javascript:alert('XSS')\nsanitizeUrl(\n  \"&#0000106&#0000097&#0000118&#0000097&#0000115&#0000099&#0000114&#0000105&#0000112&#0000116&#0000058&#0000097&#0000108&#0000101&#0000114&#0000116&#0000040&#0000039&#0000088&#0000083&#0000083&#0000039&#0000041\"\n); // 'about:blank'\n```\n\n## Testing\n\nThis library uses [Vitest](https://vitest.dev/). All testing dependencies\nwill be installed upon `npm install` and the test suite can be executed with\n`npm test`. Running the test suite will also run lint checks upon exiting.\n\n    npm test\n\nTo generate a coverage report, use `npm run coverage`.\n","publish_time":1586203753541,"maintainers":[{"name":"braintree","email":"sdk-package-registries@paypal.com"}],"_cnpm_publish_time":1586203753541,"dist-tags":{"latest":"7.1.2"}}