From: C. Scott Ananian Date: Thu, 27 Sep 2018 14:16:53 +0000 (-0400) Subject: Special:Import - wrap error messages with
not

X-Git-Tag: 1.34.0-rc.0~3975 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=b993218939b5b4e41ea68ed2127c724c18a7bb40;p=lhc%2Fweb%2Fwiklou.git Special:Import - wrap error messages with

not

Localized messages are wikitext and can contain `

` or `\n\n` which would break `

` wrappers. Be consistent with the rest of the codebase and use `

` wrappers here. Bug: T205624 Change-Id: I1e8ff5985f3a7780ad9ba063827c515e997cb508 --- diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index 3ef64f881f..153b7d1e2b 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -179,8 +179,8 @@ class SpecialImport extends SpecialPage { $out = $this->getOutput(); if ( !$source->isGood() ) { - $out->addWikiText( "

\n" . - $this->msg( 'importfailed', $source->getWikiText() )->parse() . "\n

" ); + $out->addWikiText( "
\n" . + $this->msg( 'importfailed', $source->getWikiText() )->parse() . "\n
" ); } else { $importer = new WikiImporter( $source->value, $this->getConfig() ); if ( !is_null( $this->namespace ) ) { @@ -189,7 +189,7 @@ class SpecialImport extends SpecialPage { $statusRootPage = $importer->setTargetRootPage( $this->rootpage ); if ( !$statusRootPage->isGood() ) { $out->wrapWikiMsg( - "

\n$1\n

", + "
\n$1\n
", [ 'import-options-wrong', $statusRootPage->getWikiText(), @@ -224,13 +224,13 @@ class SpecialImport extends SpecialPage { if ( $exception ) { # No source or XML parse error $out->wrapWikiMsg( - "

\n$1\n

", + "
\n$1\n
", [ 'importfailed', $exception->getMessage() ] ); } elseif ( !$result->isGood() ) { # Zero revisions $out->wrapWikiMsg( - "

\n$1\n

", + "
\n$1\n
", [ 'importfailed', $result->getWikiText() ] ); } else {