filterIframeAttribute() public méthode

Return true if the iframe source is allowed (remove not allowed iframe).
public filterIframeAttribute ( string $tag, string $attribute, string $value ) : boolean
$tag string Tag name
$attribute string Attribute name
$value string Attribute value
Résultat boolean
 public function testFilterIframeAttribute()
 {
     $filter = new Attribute(new Url('http://google.com'));
     $this->assertTrue($filter->filterIframeAttribute('iframe', 'src', 'http://www.youtube.com/test'));
     $this->assertTrue($filter->filterIframeAttribute('iframe', 'src', 'https://www.youtube.com/test'));
     $this->assertFalse($filter->filterIframeAttribute('iframe', 'src', '//www.youtube.com/test'));
     $this->assertFalse($filter->filterIframeAttribute('iframe', 'src', '//www.bidule.com/test'));
     $this->assertEquals(array('src' => 'https://www.youtube.com/test'), $filter->filter('iframe', array('src' => '//www.youtube.com/test')));
 }