From bcac48de50c818c8bc75b8f7c6d41b31e82f0b06 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Fri, 22 Dec 2006 19:58:25 +0000 Subject: [PATCH] (bug 8304) Line breaks in "new page" autosummaries should be converted to spaces. --- includes/Article.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 7332064d99..ebcb048978 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2771,8 +2771,10 @@ class Article { if ($flags & EDIT_NEW && strlen($newtext)) { #If they're making a new article, give its text, truncated, in the summary. global $wgContLang; - $truncatedtext = $wgContLang->truncate( $newtext, max( 0, 200 - - strlen( wfMsgForContent( 'autosumm-new') ) ), '...' ); + $truncatedtext = $wgContLang->truncate( + str_replace("\n", ' ', $newtext), + max( 0, 200 - strlen( wfMsgForContent( 'autosumm-new') ) ), + '...' ); $summary = wfMsgForContent( 'autosumm-new', $truncatedtext ); } -- 2.20.1