Firefox' .'Internet Explorer

'; $washer = new rcube_washtml; $washed = $washer->wash($html); $this->assertNotRegExp('/data:text/', $washed, "Remove data:text/html links"); $this->assertNotRegExp('/vbscript:/', $washed, "Remove vbscript: links"); } /** * Test fixing of invalid href (#1488940) */ function test_href() { $html = "

Firefox"; $washer = new rcube_washtml; $washed = $washer->wash($html); $this->assertRegExp('|href="http://test.com">|', $washed, "Link href with newlines (#1488940)"); } /** * Test handling HTML comments */ function test_comments() { $washer = new rcube_washtml; $html = "

p2

"; $washed = $washer->wash($html); $this->assertEquals('

p2

', $washed, "HTML conditional comments (#1489004)"); $html = "

test

', $washed, "HTML invalid comments (#1487759)"); } /** * Test fixing of invalid self-closing elements (#1489137) */ function test_self_closing() { $html = "|', $washed, "Self-closing textarea (#1489137)"); } /** * Test fixing of invalid closing tags (#1489446) */ function test_closing_tag_attrs() { $html = "test"; $washer = new rcube_washtml; $washed = $washer->wash($html); $this->assertRegExp('||', $washed, "Invalid closing tag (#1489446)"); } }