From e8e0c868e3e39567260320802faea6a31213ef7b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 7 Jan 2005 03:05:46 +0000 Subject: [PATCH] * (bug 752) Don't insert newline in link title for url with %0a --- includes/Linker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'"; -- 2.20.1