mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-12-12 00:26:47 +00:00
23 lines
452 B
PHP
23 lines
452 B
PHP
<?php
|
|
|
|
namespace PortableInfobox\Sanitizers;
|
|
|
|
class NodeHorizontalGroupSanitizer extends NodeSanitizer {
|
|
protected $allowedTags = [ 'a' ];
|
|
|
|
/**
|
|
* @param mixed $data
|
|
* @return mixed
|
|
*/
|
|
public function sanitize( $data ) {
|
|
foreach ( $data['labels'] as $key => $label ) {
|
|
$sanitizedLabel = $this->sanitizeElementData( $label );
|
|
if ( !empty( $sanitizedLabel ) ) {
|
|
$data['labels'][$key] = $sanitizedLabel;
|
|
}
|
|
}
|
|
|
|
return $data;
|
|
}
|
|
}
|