mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-16 20:57:19 +00:00
16 lines
357 B
PHP
16 lines
357 B
PHP
<?php
|
|
|
|
class NodeImageSanitizer extends NodeSanitizer implements NodeTypeSanitizerInterface {
|
|
/**
|
|
* @desc sanitize infobox image caption allowing only for links inside it
|
|
*
|
|
* @param $data
|
|
* @return mixed
|
|
*/
|
|
public function sanitize( $data ) {
|
|
$data[ 'caption' ] = $this->sanitizeElementData( $data[ 'caption' ], '<a>' );
|
|
|
|
return $data;
|
|
}
|
|
}
|