jenkins-bot has submitted this change and it was merged. (
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
M extension.json
2 files changed, 9 insertions(+), 6 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
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();
diff --git a/extension.json b/extension.json
index 01ef0d7..1017c0e 100644
--- a/extension.json
+++ b/extension.json
@@ -10,6 +10,9 @@
],
"url": "https://www.mediawiki.org/wiki/Extension:InputBox",
"descriptionmsg": "inputbox-desc",
+ "requires": {
+ "MediaWiki": ">= 1.30.0"
+ },
"license-name": "MIT",
"type": "parserhook",
"MessagesDirs": {
--
To view, visit https://gerrit.wikimedia.org/r/385118
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I99ce7bdea39c0b6fe0daed7c0be5fec0c8680321
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/InputBox
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: Fomafix <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits