mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-12-13 09:00:49 +00:00
168bf09348
* Disable sanitization on Oasis * Handle previously unsupported case of nested tag ( <b><a></a></b> ) * Unify test formatting * Change list handling (yes, I am not proud of that)
21 lines
559 B
PHP
21 lines
559 B
PHP
<?php
|
|
|
|
class NodeImageSanitizer extends NodeSanitizer {
|
|
protected $allowedTags = [ 'a' ];
|
|
protected $selectorsWrappingTextToPad = [ 'li' ];
|
|
protected $selectorsWrappingAllowedFeatures = [ 'sup[@class="reference"]' ];
|
|
protected $selectorsForFullRemoval = [ 'script', 'span[@itemprop="duration"]' ];
|
|
|
|
/**
|
|
* @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' ] );
|
|
|
|
return $data;
|
|
}
|
|
}
|