$this->
assertSame( '<img />',
$this->
sanitize($config, '<img src="/image.png" />'
) );
} public function testAllowMediasRelative() { $config =
(new HtmlSanitizerConfig()) ->
allowElement('img',
['src'
]) ->
allowRelativeMedias() ;
$this->
assertSame( '<img src="/image.png" />',
$this->
sanitize($config, '<img src="/image.png" />'
) );
$this->
assertSame( '<img src="https://trusted.com" />',
$this->
sanitize($config, '<img src="https://trusted.com" />'
) );
}