![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | test/ | 2023-06-08 13:45 | - | |
![]() | CHANGELOG.md | 2023-06-08 13:45 | 400 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | LICENSE | 2023-06-08 13:45 | 1.0K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | README.md | 2023-06-08 13:45 | 586 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | index.js | 2023-06-08 13:45 | 854 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | package.json | 2023-06-08 13:45 | 1.4K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
# sanitize-url ## Installation ```sh npm install -S @braintree/sanitize-url ``` ## Usage ```js var sanitizeUrl = require('@braintree/sanitize-url').sanitizeUrl; sanitizeUrl('https://example.com'); // 'https://example.com' sanitizeUrl('http://example.com'); // 'http://example.com' sanitizeUrl('mailto:hello@example.com'); // 'mailto:hello@example.com' sanitizeUrl('javascript:alert(document.domain)'); // 'about:blank' sanitizeUrl('jAvasCrIPT:alert(document.domain)'); // 'about:blank' sanitizeUrl(decodeURIComponent('JaVaScRiP%0at:alert(document.domain)')); // 'about:blank' ```