mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SpamBlacklist
synced 2024-11-27 16:40:04 +00:00
Escape url in Special:Log
When there is a "$1" in the url, it is treated like a message parameter and replaced. See https://www.wikidata.org/w/index.php?title=Special:Log&type=spamblacklist&page=Property:P2536. Change-Id: Ia223a89e12c652a87d52a18c78e612b4b12871bc
This commit is contained in:
parent
776989d25f
commit
3d5392403b
11
SpamBlacklistLogFormatter.php
Normal file
11
SpamBlacklistLogFormatter.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
class SpamBlacklistLogFormatter extends LogFormatter {
|
||||
|
||||
protected function getMessageParameters() {
|
||||
$params = parent::getMessageParameters();
|
||||
$params[3] = Message::rawParam( htmlspecialchars( $params[3] ) );
|
||||
return $params;
|
||||
}
|
||||
|
||||
}
|
|
@ -28,7 +28,7 @@
|
|||
"spamblacklist": "spamblacklistlog"
|
||||
},
|
||||
"LogActionsHandlers": {
|
||||
"spamblacklist/*": "LogFormatter"
|
||||
"spamblacklist/*": "SpamBlacklistLogFormatter"
|
||||
},
|
||||
"GrantPermissions": {
|
||||
"viewrestrictedlogs": {
|
||||
|
@ -49,6 +49,7 @@
|
|||
"EmailBlacklist": "EmailBlacklist.php",
|
||||
"SpamBlacklistHooks": "SpamBlacklistHooks.php",
|
||||
"SpamBlacklist": "SpamBlacklist_body.php",
|
||||
"SpamBlacklistLogFormatter": "SpamBlacklistLogFormatter.php",
|
||||
"SpamRegexBatch": "SpamRegexBatch.php",
|
||||
"SpamBlacklistPreAuthenticationProvider": "SpamBlacklistPreAuthenticationProvider.php"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue