{"name":"@braintree/sanitize-url","version":"3.1.0","keywords":[],"author":"","license":"MIT","_id":"@braintree/sanitize-url@3.1.0","homepage":"https://github.com/braintree/sanitize-url#readme","bugs":{"url":"https://github.com/braintree/sanitize-url/issues"},"dist":{"shasum":"8ff71d51053cd5ee4981e5a501d80a536244f7fd","tarball":"http://registry-npm.ywwl.com/@braintree/sanitize-url/download/@braintree/sanitize-url-3.1.0.tgz","fileCount":8,"integrity":"sha512-GcIY79elgB+azP74j8vqkiXz8xLFfIzbQJdlwOPisgbKT00tviJQuEghOXSMVxJ00HoYJbGswr4kcllUc4xCcg==","signatures":[{"sig":"MEYCIQCSHXQEFwYBiJ4VWr+vymSkxOI6TCz1nk/4CghH5KWZ+wIhAOkQJRvKlinDN0eTUpbDenEGvcMRqYJgeG7Gk7Okolab","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp4AnCRA9TVsSAnZWagAA9WYP/ix75lYyEpi+vCbND3os\nFVZcpjHBfCWJvMP7dim6E3IRIPvTp9UrtwBy8KzGM8W7+aGCz3Mym5xEaDaz\nbPRGKDIb9m/XPRaTQCy5QODLdkvS0x7C31fBUm4GbzTfVKOIHcXtMS3n0fCA\nHYbI/bmyvU9hfzSFGXsu2yoyzZBZPKVhGIBeptuhjpVhm97RiyC54foGtzPA\npbIsmGJ4NYsOLmqEVrRMqgH28h6keK4y3xFTTnMCRHTAwezPCLLMhvpH7PVR\ns29ZcyM5DoYxYuEBY+jouVRkc4DUvznUSqSwZSWKnwbX6sgifdtvWURcwXNs\nbzV4PVvYjPZi4Hav4QpiK7nAWpvOUiKhdxvZgZ4Wo1SEbCXbkmnBnpLl4WTa\nsTp/qPEZMDRZSV6MN1pIMigqeluQgX5Xei/bK4cnZ6SzhTFIj1K8Gg5sRQn1\nAURGv9f6aZXhPl0DrFG9pND73Rcr1zICU2iwBg2MG0HaYc9tUhiENipOYin+\nzV/digxICZCDZ8Pkx69DCvyR+rs4Qg/ZiElzHK7/fFoE4cvJ0hzc07koEDfp\nY7wK3K6/Sl+t0KobJS8239bbWVE6gci2LVAwXTWxyY2DIKZq5t+DNh/SEKSR\nZmBpYA9RMAX60zGf0YaBOX43Os9t1b002isSNHxgaD8eNmGWpLmyKOtdWaIz\n0ez+\r\n=w+g+\r\n-----END PGP SIGNATURE-----\r\n","size":3161,"noattachment":false,"key":"/@braintree/sanitize-url/-/@braintree/sanitize-url-3.1.0.tgz"},"main":"index.js","gitHead":"48875c019f1664cdbcdff37a485ffc8b74336706","scripts":{"test":"mocha"},"_npmUser":{"name":"braintree","email":"devs+npm@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.4.1","description":"A url sanitizer","directories":{},"_nodeVersion":"10.15.1","_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.0","mocha":"^3.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sanitize-url_3.1.0_1554481190838_0.40627469420943174","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":1554481190956,"maintainers":[{"name":"braintree","email":"sdk-package-registries@paypal.com"}],"_cnpm_publish_time":1554481190956,"dist-tags":{"latest":"7.1.2"}}