HEX
Server: Apache
System: Linux webm004.cluster121.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User: grainesdfo (155059)
PHP: 5.4.45
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/grainesdfo/www/wp-content/plugins/jupiterx-core/includes/svg-sanitizer/functions.php
<?php
/**
 * SVG Sanitizer
 *
 * @package JupiterX_Core\SVG_Sanitizer
 * source: https://github.com/darylldoyle/svg-sanitizer
 */


/**
 * Sanitizes SVG content to remove potentially harmful elements and attributes.
 *
 * @param mixed $svg_content SVG content to sanitize.
 *
 * @return bool|string
 * @since 4.9.1
 */
function jupiterx_svg_sanitizer( $svg_content ) {
	jupiterx_core()->load_files( [ 'svg-sanitizer/vendors/autoload' ] );

	$sanitizer = new JupiterX_Core\enshrined\svgSanitize\Sanitizer();

	return $sanitizer->sanitize( $svg_content );
}