* (bug 4377) "[" is not valid in URLs
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 24 Dec 2005 10:07:26 +0000 (10:07 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 24 Dec 2005 10:07:26 +0000 (10:07 +0000)
RELEASE-NOTES
includes/Parser.php
maintenance/parserTests.txt

index 0010934..d12ef26 100644 (file)
@@ -349,6 +349,7 @@ fully support the editing toolbar, but was found to be too confusing.
 * Fix autoconfirm check for old accounts
 * (bug 4368) Don't show useless empty preview on new section creation
 * Don't show useless empty preview on new page creation
+* (bug 4377) "[" is not valid in URLs
 
 
 === Caveats ===
index 86d885f..5fa67cf 100644 (file)
@@ -46,7 +46,7 @@ define( 'STRIP_COMMENTS', 'HTMLCommentStrip' );
 # Constants needed for external link processing
 define( 'HTTP_PROTOCOLS', 'http:\/\/|https:\/\/' );
 # Everything except bracket, space, or control characters
-define( 'EXT_LINK_URL_CLASS', '[^]<>"\\x00-\\x20\\x7F]' );
+define( 'EXT_LINK_URL_CLASS', '[^][<>"\\x00-\\x20\\x7F]' );
 # Including space
 define( 'EXT_LINK_TEXT_CLASS', '[^\]\\x00-\\x1F\\x7F]' );
 define( 'EXT_IMAGE_FNAME_CLASS', '[A-Za-z0-9_.,~%\\-+&;#*?!=()@\\x80-\\xFF]' );
index bed4614..792902a 100644 (file)
@@ -394,6 +394,24 @@ External links: dollar sign in URL (named)
 </p>
 !!end
 
+!! test
+External links: open square bracket forbidden in URL (bug 4377)
+!! input
+http://example.com/1[2345
+!! result
+<p><a href="http://example.com/1" class='external free' title="http://example.com/1" rel="nofollow">http://example.com/1</a>[2345
+</p>
+!! end
+
+!! test
+External links: open square bracket forbidden in URL (named) (bug 4377)
+!! input
+[http://example.com/1[2345]
+!! result
+<p><a href="http://example.com/1" class='external text' title="http://example.com/1" rel="nofollow">[2345</a>
+</p>
+!!end
+
 !! test
 External image
 !! input