Seb35 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354999 )

Change subject: Better escaping
......................................................................

Better escaping

In French, the special page Session displays " Adresse IP : "
because of a parser rule + HTML-escaping. This patch request a text
version of three messages instead of a wikitext version.

Change-Id: I852c1814d9ef84daf83c5f30dcf5fbea5ec74b06
---
M SpecialSessions.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecureSessions 
refs/changes/99/354999/1

diff --git a/SpecialSessions.php b/SpecialSessions.php
index f797e62..7b85365 100644
--- a/SpecialSessions.php
+++ b/SpecialSessions.php
@@ -83,11 +83,11 @@
                        // Make a table describing the session.
                        $description = Html::rawElement( 'table', array(),
                                Html::rawElement( 'tr', array(),
-                                       Html::element( 'td', array( 'class' => 
'mw-label' ), $this->msg( 'securesessions-sessions-ip' ) ) .
+                                       Html::element( 'td', array( 'class' => 
'mw-label' ), $this->msg( 'securesessions-sessions-ip' )->escaped() ) .
                                        Html::element( 'td', array( 'class' => 
'mw-input' ), $session['ip'] )
                                ) .
                                Html::rawElement( 'tr', array(),
-                                       Html::element( 'td', array( 'class' => 
'mw-label' ), $this->msg( 'securesessions-sessions-activity' ) ) .
+                                       Html::element( 'td', array( 'class' => 
'mw-label' ), $this->msg( 'securesessions-sessions-activity' )->escaped() ) .
                                        Html::element( 'td', array( 'class' => 
'mw-input' ), $timestamp->getHumanTimestamp() )
                                )
                        );
@@ -119,7 +119,7 @@
 
                $form = new HTMLForm( $this->fields, $this->getContext() );
                $form->setSubmitCallback( array( $this, 'onSubmit' ) );
-               $form->setWrapperLegend( $this->msg( 
'securesessions-sessions-legend' ) );
+               $form->setWrapperLegend( $this->msg( 
'securesessions-sessions-legend' )->text() );
                $form->addHeaderText(
                        $this->msg( 'securesessions-sessions-text' 
)->parseAsBlock() );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I852c1814d9ef84daf83c5f30dcf5fbea5ec74b06
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SecureSessions
Gerrit-Branch: master
Gerrit-Owner: Seb35 <se...@seb35.fr>

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

Reply via email to