PortableInfobox/services/Sanitizers/NodeHorizontalGroupSanitizer.php
2015-12-30 11:00:10 +01:00

19 lines
386 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;
}
}