From d54ec57f07c3f39c62addc5deacff944315fa6eb Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Sun, 6 Jul 2008 01:48:48 +0000 Subject: [PATCH] Trim up trailing newlines before footer gets added. --- includes/specials/SpecialEmailuser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/specials/SpecialEmailuser.php b/includes/specials/SpecialEmailuser.php index e81ef93300..3874c6a1d6 100644 --- a/includes/specials/SpecialEmailuser.php +++ b/includes/specials/SpecialEmailuser.php @@ -148,8 +148,8 @@ class EmailUserForm { $from = new MailAddress( $wgUser ); $subject = $this->subject; - // Add a standard footer - $this->text = $this->text . "\n ---- \n" . wfMsgExt( 'emailuserfooter', + // Add a standard footer and trim up trailing newlines + $this->text = rtrim($this->text) . "\n\n---\n" . wfMsgExt( 'emailuserfooter', array( 'content', 'parsemag' ), array( $from->name, $to->name ) ); if( wfRunHooks( 'EmailUser', array( &$to, &$from, &$subject, &$this->text ) ) ) { -- 2.20.1