From 43aeb195c159cac8352f1eeb5148c060ff0b81b6 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 1 Feb 2013 20:04:00 +0100 Subject: Fix handling link href attribute value with (valid) newline characters (#1488940) --- tests/Framework/Washtml.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests') diff --git a/tests/Framework/Washtml.php b/tests/Framework/Washtml.php index 088ac4a8c..6f4aa9783 100644 --- a/tests/Framework/Washtml.php +++ b/tests/Framework/Washtml.php @@ -25,4 +25,18 @@ class Framework_Washtml extends PHPUnit_Framework_TestCase $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)"); + } + } -- cgit v1.2.3