Nikerabbit has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/177976

Change subject: Escape unescaped messages shown in action=info
......................................................................

Escape unescaped messages shown in action=info

Change-Id: Id16d8c8dff73fdacad6c9a4ff7f2919945b7e893
---
M includes/Linker.php
M includes/actions/InfoAction.php
2 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/76/177976/1

diff --git a/includes/Linker.php b/includes/Linker.php
index 927ab1f..081123c 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -2033,14 +2033,14 @@
                                if ( $titleObj->quickUserCan( 'edit' ) ) {
                                        $editLink = self::link(
                                                $titleObj,
-                                               wfMessage( 'editlink' )->text(),
+                                               wfMessage( 'editlink' 
)->escaped(),
                                                array(),
                                                array( 'action' => 'edit' )
                                        );
                                } else {
                                        $editLink = self::link(
                                                $titleObj,
-                                               wfMessage( 'viewsourcelink' 
)->text(),
+                                               wfMessage( 'viewsourcelink' 
)->escaped(),
                                                array(),
                                                array( 'action' => 'edit' )
                                        );
diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php
index e7455f6..a3f7a1b 100644
--- a/includes/actions/InfoAction.php
+++ b/includes/actions/InfoAction.php
@@ -295,7 +295,7 @@
                // Content model of the page
                $pageInfo['header-basic'][] = array(
                        $this->msg( 'pageinfo-content-model' ),
-                       ContentHandler::getLocalizedName( 
$title->getContentModel() )
+                       htmlspecialchars( ContentHandler::getLocalizedName( 
$title->getContentModel() ) )
                );
 
                // Search engine status
@@ -477,7 +477,7 @@
                                $this->msg( 'pageinfo-firsttime' ),
                                Linker::linkKnown(
                                        $title,
-                                       $lang->userTimeAndDate( 
$firstRev->getTimestamp(), $user ),
+                                       htmlspecialchars( 
$lang->userTimeAndDate( $firstRev->getTimestamp(), $user ) ),
                                        array(),
                                        array( 'oldid' => $firstRev->getId() )
                                )
@@ -496,7 +496,7 @@
                                $this->msg( 'pageinfo-lasttime' ),
                                Linker::linkKnown(
                                        $title,
-                                       $lang->userTimeAndDate( 
$this->page->getTimestamp(), $user ),
+                                       htmlspecialchars( 
$lang->userTimeAndDate( $this->page->getTimestamp(), $user ) ),
                                        array(),
                                        array( 'oldid' => 
$this->page->getLatest() )
                                )

-- 
To view, visit https://gerrit.wikimedia.org/r/177976
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id16d8c8dff73fdacad6c9a4ff7f2919945b7e893
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <niklas.laxst...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to