From: C. Scott Ananian Date: Thu, 27 Sep 2018 13:24:15 +0000 (-0400) Subject: Special:NewFiles - ensure top text is entirely wrapped X-Git-Tag: 1.34.0-rc.0~3974^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/%28%5B%5E/fichier?a=commitdiff_plain;h=df944a187982fbfd5aeac787ec91a7bb60ae03f6;p=lhc%2Fweb%2Fwiklou.git Special:NewFiles - ensure top text is entirely wrapped The template on commons for newimagestext has a
wrapper, and trying to wrap a

around a

doesn't work: the

is implicitly closed by the start of the

. Use a
wrapper to set the content language and directionality instead, which ensures that it is valid HTML and will be tidied correctly. In the process, fix an extra argument (and unnecessary optional argument) passed to OutputPage::addWikiTextTidy in Ife33ceed39ed01d4e9af18e9108026f341e9b343. Bug: T205624 Change-Id: I42d198e6d03afd5b976da741f235c175bfe9f767 --- diff --git a/includes/specials/SpecialNewimages.php b/includes/specials/SpecialNewimages.php index 513d14c437..e88162ecab 100644 --- a/includes/specials/SpecialNewimages.php +++ b/includes/specials/SpecialNewimages.php @@ -219,16 +219,14 @@ class SpecialNewFiles extends IncludableSpecialPage { if ( !$message->isDisabled() ) { $contLang = MediaWikiServices::getInstance()->getContentLanguage(); $this->getOutput()->addWikiTextTidy( - Html::rawElement( 'p', + Html::rawElement( 'div', [ 'lang' => $contLang->getHtmlCode(), 'dir' => $contLang->getDir() ], "\n" . $message->plain() . "\n" - ), - /* $lineStart */ false, - /* $interface */ false + ) ); } }