PortableInfobox/services/Sanitizers/NodeHorizontalGroupSanitizer.php
2015-12-29 08:13:02 +01:00

19 lines
384 B
PHP

<?php
class NodeHorizontalGroupSanitizer extends NodeSanitizer {
/**
* @param $data
* @return mixed
*/
public function sanitize( $data ) {
foreach ( $data[ 'labels' ] as $key => $label ) {
$sanitizedLabel = $this->sanitizeElementData( $label, '<a>' );
if ( !empty( $sanitizedLabel ) ) {
$data[ 'labels' ][ $key ] = $sanitizedLabel;
}
}
return $data;
}
}