3 class HTMLPurifier_HTMLModule_SafeEmbedTest
extends HTMLPurifier_HTMLModuleHarness
6 public function setUp()
9 $def = $this->config
->getHTMLDefinition(true);
10 $def->manager
->addModule('SafeEmbed');
13 public function testMinimal()
16 '<embed src="http://www.youtube.com/v/RVtEQxH7PWA&hl=en" />',
17 '<embed src="http://www.youtube.com/v/RVtEQxH7PWA&hl=en" allowscriptaccess="never" allownetworking="internal" type="application/x-shockwave-flash" />'
21 public function testYouTube()
24 '<embed src="http://www.youtube.com/v/RVtEQxH7PWA&hl=en" type="application/x-shockwave-flash" width="425" height="344"></embed>',
25 '<embed src="http://www.youtube.com/v/RVtEQxH7PWA&hl=en" type="application/x-shockwave-flash" width="425" height="344" allowscriptaccess="never" allownetworking="internal" />'
29 public function testMalicious()
32 '<embed src="http://example.com/bad.swf" type="application/x-shockwave-flash" width="9999999" height="3499994" allowscriptaccess="always" allownetworking="always" />',
33 '<embed src="http://example.com/bad.swf" type="application/x-shockwave-flash" width="1200" height="1200" allowscriptaccess="never" allownetworking="internal" />'
37 public function testFull()
40 '<b><embed src="http://www.youtube.com/v/RVtEQxH7PWA&hl=en" type="application/x-shockwave-flash" width="24" height="23" allowscriptaccess="never" allownetworking="internal" wmode="window" /></b>'