[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]test/2023-06-08 13:45 -  
[TXT]CHANGELOG.md2023-06-08 13:45 400 0fb859dc fixed mobile overflwo options [كارل مبارك]
[   ]LICENSE2023-06-08 13:45 1.0K0fb859dc fixed mobile overflwo options [كارل مبارك]
[TXT]README.md2023-06-08 13:45 586 0fb859dc fixed mobile overflwo options [كارل مبارك]
[   ]index.js2023-06-08 13:45 854 0fb859dc fixed mobile overflwo options [كارل مبارك]
[   ]package.json2023-06-08 13:45 1.4K0fb859dc 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'
```