'.
'I always throw up in hindsight if I find out something I ate was vegan. Twogag’s super free but if you want to support the comic look no further than the Twogag patreon!';
$filter = new Html($html, 'http://www.twogag.com/');
$expected = '
'.
'I always throw up in hindsight if I find out something I ate was vegan. Twogag’s super free but if you want to support the comic look no further than the Twogag patreon!';
$this->assertEquals($expected, $filter->execute());
}
public function testIframe()
{
$data = '';
$f = new Html($data, 'http://blabla');
$this->assertEmpty($f->execute());
$data = '';
$expected = '';
$f = new Html($data, 'http://blabla');
$this->assertEquals($expected, $f->execute());
}
public function testClearScriptAttributes()
{
$data = '
something
hi
';
$f = new Html($data, 'http://blabla');
$expected = '
something
hi
';
$this->assertEquals($expected, $f->execute());
}
public function testClearStyleAttributes()
{
$data = '
something
hi
';
$f = new Html($data, 'http://blabla');
$expected = '
something
hi
';
$this->assertEquals($expected, $f->execute());
}
public function testEmptyTags()
{
$data = <<
EOD;
$f = new Html($data, 'http://blabla');
$output = $f->execute();
$this->assertEquals('', $output);
}
public function testBadAttributes()
{
$data = '';
$f = new Html($data, 'http://blabla');
$this->assertEquals('', $f->execute());
}
public function testRelativeScheme()
{
$f = new Html('link', 'http://blabla');
$this->assertEquals('link', $f->execute());
}
public function testAttributes()
{
$f = new Html('', 'http://blabla');
$this->assertEquals('', $f->execute());
$f = new Html('', 'http://blabla');
$this->assertEquals('', $f->execute());
$f = new Html("", 'http://blabla');
$this->assertEquals('', $f->execute());
}
public function testCode()
{
$data = '