From c08b18c4b92cc7c253c72709e3aecb639a742d9f Mon Sep 17 00:00:00 2001 From: alecpl Date: Fri, 29 Apr 2011 08:17:42 +0000 Subject: - Fix relative URLs handling according to a in HTML (#1487889) --- tests/mailfunc.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/mailfunc.php') diff --git a/tests/mailfunc.php b/tests/mailfunc.php index 92cfbb100..9d70befeb 100644 --- a/tests/mailfunc.php +++ b/tests/mailfunc.php @@ -145,4 +145,16 @@ class rcube_test_mailfunc extends UnitTestCase $this->assertNoPattern('|

test2

|', $washed, "Conditional HTML comments"); } + /** + * Test URI base resolving in HTML messages + */ + function test_resolve_base() + { + $html = file_get_contents(TESTS_DIR . 'src/htmlbase.txt'); + $html = rcmail_resolve_base($html); + + $this->assertPattern('|src="http://alec\.pl/dir/img1\.gif"|', $html, "URI base resolving [1]"); + $this->assertPattern('|src="http://alec\.pl/dir/img2\.gif"|', $html, "URI base resolving [2]"); + $this->assertPattern('|src="http://alec\.pl/img3\.gif"|', $html, "URI base resolving [3]"); + } } -- cgit v1.2.3