Exemplo n.º 1
0
 public function testRemovalOfIllegalCss()
 {
     $html = '<p style="background-color: url(\'http://foo.com/\'); background-color: #000;" />';
     $doc = new Wibble\HTML\Document($html);
     $doc->filter('escape');
     $xpath = new \DOMXPath($doc->getDOM());
     $result = $xpath->query('//p');
     $this->assertEquals('background-color: #000;', $result->item(0)->getAttribute('style'));
 }
Exemplo n.º 2
0
 public function testBasicDocumentWithoutTidy()
 {
     $doc = new Wibble\HTML\Document($this->fragment, array('disable_tidy' => true));
     $this->assertEquals($this->fragment, $this->getInnerHTMLFrom($doc->getDOM(), '/html/body'));
 }