Escaping SVG with KSES
I'm trying to output an SVG file in a template, and PHPCS is telling me I need to escape the output. So I tried with KSES and it doesn't seem to want to include the viewbox attribute.
$allowed_html = array(
'svg' = array(
'xmlns' = array (),
'viewBox' = true
),
'path' = array(
'd'= array(),
),
);
wp_kses(file_get_contents( $logo ), $allowed_html )
Any ideas why this doesn't work?