/SVG-Sanitizer

Whitelist-based PHP SVG sanitizer.

Primary LanguagePHPMIT LicenseMIT

SVG Sanitizer

Whitelist-based PHP SVG sanitizer.

Usage

<?php

// load
require_once('SvgSanitizer.php');
$svg = new SvgSanitizer();

// load SVG
$svg->load("evil.svg");

// sanitize!
$svg->sanitize();

// Print out sanitized SVG
echo $svg->saveSVG();

?>

License

MIT