summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-02-01 20:04:00 +0100
committerAleksander Machniak <alec@alec.pl>2013-02-01 20:04:00 +0100
commit1f910cb50dcb12e84d92db4d61dcd8dbb0f0c5b6 (patch)
tree1107e0fce45d40297e6bd055521d724230c05e8d /tests
parent8bfbd5e9f9c1d2c4657bda2f6099f01fc8097846 (diff)
Fix handling link href attribute value with (valid) newline characters (#1488940)
Diffstat (limited to 'tests')
-rw-r--r--tests/Framework/Washtml.php14
1 files changed, 14 insertions, 0 deletions
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 = "<p><a href=\"\nhttp://test.com\n\">Firefox</a>";
+
+ $washer = new rcube_washtml;
+
+ $washed = $washer->wash($html);
+
+ $this->assertRegExp('|href="http://test.com">|', $washed, "Link href with newlines (#1488940)");
+ }
+
}