easy_svg_svg_too_complex()
Tells whether an SVG is too structurally complex to sanitize at a bounded cost.
Function · Easy SVG · Status: Internal · Defined in easy-svg.php
Internal: not part of the promised public surface. It may change without notice.
Usage
easy_svg_svg_too_complex( string $markup ): bool
Example
if ( easy_svg_svg_too_complex( $markup ) ) {
return false;
}
Description
Counts PHP processing instructions and use elements, two linear counts, and compares them with easy_svg_max_php_tags (10) and easy_svg_max_use_tags (1000). Run it before handing markup to the sanitizer, as the plugin does on every path.
Parameters
body
$markupstring
Raw SVG markup.
Return value
returnbool
True when either count is over its bound.
Related
Was this page helpful?