diff options
author | Brion Vibber <brion@pobox.com> | 2009-10-23 13:50:39 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2009-10-23 13:50:39 -0700 |
commit | ff4f9d8c7d6d1d5c4a69d75924e4da67a883db44 (patch) | |
tree | c2d2340717bb38308c43f1a9e391fea82b1800f5 /tests | |
parent | b89878511f1f30b4e18858940a5468b8999ab7ea (diff) |
Fix an incorrectly passing URL test case and add two a related test case:
URLs with paths followed by a double-quote character are incorrectly including the quote in the URL. The double-quote character is in fact not a legal URL char and must be URL-escaped; more importantly it just causes oddities when you quote a message ending in a URL -- such as when using the redent-button experimental feature.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/URLDetectionTest.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/URLDetectionTest.php b/tests/URLDetectionTest.php index 45203bf6e..0cc03ccce 100644 --- a/tests/URLDetectionTest.php +++ b/tests/URLDetectionTest.php @@ -47,7 +47,9 @@ class URLDetectionTest extends PHPUnit_Framework_TestCase array('127.0.0.1/\'test', '<a href="http://127.0.0.1/\'test" title="http://127.0.0.1/\'test" rel="external">127.0.0.1/\'test</a>'), array('127.0.0.1/"test', - '<a href="http://127.0.0.1/"test" title="http://127.0.0.1/"test" rel="external">127.0.0.1/"test</a>'), + '<a href="http://127.0.0.1/" title="http://127.0.0.1/" rel="external">127.0.0.1/</a>"test'), + array('127.0.0.1/test"test', + '<a href="http://127.0.0.1/test" title="http://127.0.0.1/test" rel="external">127.0.0.1/test</a>"test'), array('127.0.0.1/-test', '<a href="http://127.0.0.1/-test" title="http://127.0.0.1/-test" rel="external">127.0.0.1/-test</a>'), array('127.0.0.1/_test', @@ -170,6 +172,8 @@ class URLDetectionTest extends PHPUnit_Framework_TestCase '\'<a href="http://example.com/" title="http://example.com/" rel="external">http://example.com</a>\''), array('"http://example.com"', '"<a href="http://example.com/" title="http://example.com/" rel="external">http://example.com</a>"'), + array('"http://example.com/"', + '"<a href="http://example.com/" title="http://example.com/" rel="external">http://example.com/</a>"'), array('http://example.com', '<a href="http://example.com/" title="http://example.com/" rel="external">http://example.com</a>'), array('(http://example.com)', |