{"name":"@braintree/sanitize-url","version":"4.1.1","keywords":[],"author":"","license":"MIT","_id":"@braintree/sanitize-url@4.1.1","homepage":"https://github.com/braintree/sanitize-url#readme","bugs":{"url":"https://github.com/braintree/sanitize-url/issues"},"dist":{"shasum":"671b3cfdbcc40d1449036ce586e882ab6150828e","tarball":"http://registry-npm.ywwl.com/@braintree/sanitize-url/download/@braintree/sanitize-url-4.1.1.tgz","fileCount":15,"integrity":"sha512-epVksusKVEpwBs2vRg3SWssxn9KXs9CxEYNOcgeSRLRjq070ABj5bLPxkmtQpVeSPCHj8kfAE9J6z2WsLr4wZg==","signatures":[{"sig":"MEYCIQDkuqHu2bd7/fCml6zNRtpHggCci3I62tfUNF3gEvUAJgIhAPLQfRJVg6zty+LcW1S1I4A09VBAnavnCWpjI6u/JylH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11249,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfF09RCRA9TVsSAnZWagAANGAQAIrT+z5BUg5dKb/48mRP\n3aw/aQAzo/pFxAv8GbAyic/zY1rU6knnnWoMiBZJBbsNDp3Uso6MKxhdzlD9\nUUUugehRLpNZpIJRRYXQAmC8b1mjsn3gmMm2eTh70ui4ym1tnI/2CJicHqUT\nLDC25u4x48vRqKX7e/CDiaX0wufTPeUWt09spVRWbVPz6fwq91wa6aqAkGOI\n8t7od94VQk6lcxgFZ8Qxf9JiXZonKhy1AIQY3oiwGEXtfE8Rzcv47c2RzQBa\npIMW8irZGUvR9oWnCrFJo2B4UOULnS/G5qHwTI1eKo79q+yML8BmoStjPLwm\nq4j5ZWJxMcargUccYolZe2zgeJhjCDrz+JHfYlNJ31lJuo90/W+zLH/pNuYg\nJVAJ1T3wI6yFauXaLurWbcBZpa9kG2jcrg3TmW4idefUm64yqj9mZbzMHq99\nOcncu1KiHTeyTRxVZGuFCm+VkswK7y6wg6ej/5UM2/j47+TsVuWvkCF+lN4z\nHxmHzTjtIM0WKSOuYRo1vsw2L6P0AKn+MgK72PhvoPVNZMkcxDEc1P45WJ4B\ny3N0zTzgynTk2osp3A3+6eiBtASry3SIvEhNIoKVrWJ5Fx1BJNP823Dgo6h0\n2MsDywihid2UmdmgX8Lwv0gDQoGkgfCsZqdrZknLHHuUP33jbC/OfR11hs+x\n4WPb\r\n=Lkcz\r\n-----END PGP SIGNATURE-----\r\n","size":4178,"noattachment":false,"key":"/@braintree/sanitize-url/-/@braintree/sanitize-url-4.1.1.tgz"},"jest":{"preset":"ts-jest","globals":{"ts-jest":{"tsConfig":"src/__tests__/tsconfig.json"}}},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"7cadadcef499835df979de97d0a65fc89cf89b99","scripts":{"lint":"eslint --ext js,ts .","test":"jest","build":"tsc --declaration","posttest":"npm run lint","prebuild":"prettier --write .","prepublishOnly":"npm run build"},"_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","jest":"^26.1.0","eslint":"^7.4.0","ts-jest":"^26.1.3","prettier":"^2.0.5","typescript":"^3.9.7","@types/jest":"^26.0.4","eslint-config-braintree":"^5.0.0-typescript-prep-rc.17"},"_npmOperationalInternal":{"tmp":"tmp/sanitize-url_4.1.1_1595363153294_0.9776528752742519","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":1595363153394,"maintainers":[{"name":"braintree","email":"sdk-package-registries@paypal.com"}],"_cnpm_publish_time":1595363153394,"dist-tags":{"latest":"7.1.2"}}