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

Change subject: Don't use deprecated Sanitizer::escapeId()
......................................................................

Don't use deprecated Sanitizer::escapeId()

Change-Id: I99ce7bdea39c0b6fe0daed7c0be5fec0c8680321
---
M InputBox.classes.php
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/InputBox 
refs/changes/18/385118/1

diff --git a/InputBox.classes.php b/InputBox.classes.php
index b96e8d6..f504468 100644
--- a/InputBox.classes.php
+++ b/InputBox.classes.php
@@ -138,13 +138,13 @@
                        $this->mSearchButtonLabel = wfMessage( 
'inputbox-searchfulltext' )->text();
                }
                if ( $this->mID !== '' ) {
-                       $idArray = [ 'id' => Sanitizer::escapeId( $this->mID ) 
];
+                       $idArray = [ 'id' => Sanitizer::escapeIdForAttribute( 
$this->mID ) ];
                } else {
                        $idArray = [];
                }
                // We need a unqiue id to link <label> to checkboxes, but also
                // want multiple <inputbox>'s to not be invalid html
-               $idRandStr = Sanitizer::escapeId( '-' . $this->mID . 
wfRandom(), 'noninitial' );
+               $idRandStr = Sanitizer::escapeIdForAttribute( '-' . $this->mID 
. wfRandom() );
 
                // Build HTML
                $htmlOut = Xml::openElement( 'div',
@@ -309,7 +309,7 @@
                        // having conflicts.
                        $unescapedID = wfRandom();
                }
-               $id = Sanitizer::escapeId( $unescapedID, 'noninitial' );
+               $id = Sanitizer::escapeIdForAttribute( $unescapedID );
                $htmlLabel = '';
                if ( isset( $this->mLabelText ) && strlen( trim( 
$this->mLabelText ) ) ) {
                        $this->mLabelText = $this->mParser->recursiveTagParse( 
$this->mLabelText );
@@ -400,7 +400,7 @@
                        'method' => 'get'
                ];
                if ( $this->mID !== '' ) {
-                       $createBoxParams['id'] = Sanitizer::escapeId( 
$this->mID );
+                       $createBoxParams['id'] = 
Sanitizer::escapeIdForAttribute( $this->mID );
                }
                $htmlOut .= Xml::openElement( 'form', $createBoxParams );
                $editArgs = $this->getEditActionArgs();
@@ -483,7 +483,7 @@
                        'method' => 'get'
                ];
                if ( $this->mID !== '' ) {
-                       $moveBoxParams['id'] = Sanitizer::escapeId( $this->mID 
);
+                       $moveBoxParams['id'] = Sanitizer::escapeIdForAttribute( 
$this->mID );
                }
                $htmlOut .= Xml::openElement( 'form', $moveBoxParams );
                $htmlOut .= Html::hidden( 'title',
@@ -540,7 +540,7 @@
                        'method' => 'get'
                ];
                if ( $this->mID !== '' ) {
-                       $commentFormParams['id'] = Sanitizer::escapeId( 
$this->mID );
+                       $commentFormParams['id'] = 
Sanitizer::escapeIdForAttribute( $this->mID );
                }
                $htmlOut .= Xml::openElement( 'form', $commentFormParams );
                $editArgs = $this->getEditActionArgs();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I99ce7bdea39c0b6fe0daed7c0be5fec0c8680321
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/InputBox
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to