bachilli/sanitize-url

PHP port of braintree/sanitize-url package

dev-main 2023-03-28 04:51 UTC

This package is not auto-updated.

Last update: 2024-11-06 10:20:23 UTC


README

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