Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 328 Bytes

README.md

File metadata and controls

17 lines (11 loc) · 328 Bytes

sanitize-url

PHP port of braintree/sanitize-url typescript package.

How to use

use Bachilli\SanitizeUrl;

$sanitizeUrl = new SanitizeUrl();

$sanitizeUrl->sanitizeUrl('https://www.example.com');
// output: https://www.example.com

$sanitizeUrl->sanitizeUrl('javascript:alert(\'XSS\')');
// output: about:blank