Skip to content

SvgSanitizer

SVGSantiizer

Whitelist-based PHP SVG sanitizer.

  • Full name: \Zotlabs\Lib\SvgSanitizer

See Also:

  • https://github.com/alister-/SVG-Sanitizer} - @author Alister Norris @copyright Copyright (c) 2013 Alister Norris @license http://opensource.org/licenses/mit-license.php The MIT License @package svgsanitizer

Properties

xmlDoc

private $xmlDoc

removedattrs

private $removedattrs

allowed_functions

private static $allowed_functions
  • This property is static.

whitelist

private static $whitelist
  • This property is static.

Methods

__construct

public __construct(): mixed

load

public load(mixed $file): mixed

Parameters:

Parameter Type Description
$file mixed

loadXML

public loadXML(mixed $str): mixed

Parameters:

Parameter Type Description
$str mixed

sanitize

public sanitize(): mixed

saveSVG

public saveSVG(): mixed


Automatically generated on 2025-03-19