* Make Live Preview an user preference, still controllable by the global variable
* Rename the stub LanguageAls / LanguageGem_alsation to LanguageGsw to follow
updated language code assignments
+* (bug 5081) Remove bogus fix for invalid characters in links which simply
+ broke use of legitimate multiple whitespace characters in bracketed link.
=== Caveats ===
define( 'EXT_LINK_TEXT_CLASS', '[^\]\\x00-\\x1F\\x7F]' );
define( 'EXT_IMAGE_FNAME_CLASS', '[A-Za-z0-9_.,~%\\-+&;#*?!=()@\\x80-\\xFF]' );
define( 'EXT_IMAGE_EXTENSIONS', 'gif|png|jpg|jpeg' );
-define( 'EXT_LINK_BRACKETED', '/\[(\b(' . wfUrlProtocols() . ')'.EXT_LINK_URL_CLASS.'+)( *)('.EXT_LINK_TEXT_CLASS.'*?)\]/S' );
+define( 'EXT_LINK_BRACKETED', '/\[(\b(' . wfUrlProtocols() . ')'.EXT_LINK_URL_CLASS.'+) *('.EXT_LINK_TEXT_CLASS.'*?)\]/S' );
define( 'EXT_IMAGE_REGEX',
'/^('.HTTP_PROTOCOLS.')'. # Protocol
'('.EXT_LINK_URL_CLASS.'+)\\/'. # Hostname and path
while ( $i<count( $bits ) ) {
$url = $bits[$i++];
$protocol = $bits[$i++];
- $spaces = $bits[$i++];
$text = $bits[$i++];
$trail = $bits[$i++];
# This means that users can paste URLs directly into the text
# Funny characters like ö aren't valid in URLs anyway
# This was changed in August 2004
- if ( strlen ( $spaces ) < 2 ) {
- # Normal case
- $s .= $sk->makeExternalLink( $url, $text, false, $linktype ) . $dtrail . $trail;
- } else {
- # Fix for [url text] (notice the two blanks)
- $s .= '[' . $sk->makeExternalLink( $url, $url, false, "free" ) . $spaces . $text . ']' . $dtrail . $trail;
- }
+ $s .= $sk->makeExternalLink( $url, $text, false, $linktype ) . $dtrail . $trail;
# Register link in the output object
$this->mOutput->addExternalLink( $url );
</p>
!! end
+!! test
+External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
+!! input
+[http://www.example.com test]
+!! result
+<p><a href="http://www.example.com" class='external text' title="http://www.example.com" rel="nofollow">test</a>
+</p>
+!! end
+
!! test
BUG 787: Links with one slash after the url protocol are invalid
!! input