ImagePage: Do not parse message 'imgmultipageprev'
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 29 May 2017 13:22:03 +0000 (15:22 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 29 May 2017 13:22:03 +0000 (15:22 +0200)
This message is used as alt text for an image thumbnail, and so it
can't contain HTML tags anyway. This matches the 'imgmultipagenext'
message now. (This inconsistency has been present ever since the
feature was introduced in 2006: 7f7e79022bfd421e49084b089e74c7a16b77bc03.)

Due to using OutputPage::parse() instead of Message::parse(), an
incorrect `<div class="mw-parser-output">` wrapper was also being added.

Bug: T166508
Change-Id: I092887cc91e2c800685d4e55177aed814bb3fce9

includes/page/ImagePage.php

index f3c3ed8..6a751ac 100644 (file)
@@ -434,7 +434,7 @@ class ImagePage extends Article {
                                        $count = $this->displayImg->pageCount();
 
                                        if ( $page > 1 ) {
-                                               $label = $out->parse( $this->getContext()->msg( 'imgmultipageprev' )->text(), false );
+                                               $label = $this->getContext()->msg( 'imgmultipageprev' )->text();
                                                // on the client side, this link is generated in ajaxifyPageNavigation()
                                                // in the mediawiki.page.image.pagination module
                                                $link = Linker::linkKnown(