From: Brion Vibber Date: Fri, 7 Jan 2005 03:05:46 +0000 (+0000) Subject: * (bug 752) Don't insert newline in link title for url with %0a X-Git-Tag: 1.5.0alpha1~986 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=e8e0c868e3e39567260320802faea6a31213ef7b;p=lhc%2Fweb%2Fwiklou.git * (bug 752) Don't insert newline in link title for url with %0a --- diff --git a/includes/Linker.php b/includes/Linker.php index 3be567691a..72770ab425 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -43,7 +43,7 @@ class Linker { $same = ($link == $text); $link = urldecode( $link ); $link = $wgContLang->checkTitleEncoding( $link ); - $link = str_replace( '_', ' ', $link ); + $link = preg_replace( '/[\\x00-\\x1f_]/', ' ', $link ); $link = htmlspecialchars( $link ); $r = ($class != '') ? " class='$class'" : " class='external'";