PortableInfobox/services/Sanitizers/NodeHorizontalGroupSanitizer.php
2015-12-23 15:54:03 +01:00

19 lines
422 B
PHP

<?php
class NodeHorizontalGroupSanitizer extends NodeSanitizer implements NodeTypeSanitizerInterface {
/**
* @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;
}
}