Page MenuHomePhabricator

Don't escape some messages in AbuseFilterViewEdit so admins can add links to external tools
Closed, ResolvedPublic

Description

For instance https://tools.wmflabs.org/ptwikis/Filters:enwiki:1

This tool is very helpful and it would be nice if we could link to it within the interface of viewing an individual filter. The messages that stand out to me are MediaWiki:Abusefilter-edit-status (line listing recent stats about the filter) and MediaWiki:Abusefilter-edit-subtitle (subtitle for the page). In the former we can use {{#titleparts}} to get the filter ID, since {{SUBPAGENAME}} won't work,

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 5 2017, 10:04 PM

Change 336168 had a related patch set uploaded (by MusikAnimal):
Don't escape text in some messages so that admins can add links to external tools

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

There's also a bug concerning abusefilter messages not parsing wikitext
properly that might be related to this one, but I cannot remeber the
number. I think the last patch I abandoned was for it.

Change 336245 had a related patch set uploaded (by MusikAnimal):
Don't escape text in some messages so that admins can add links to external tools

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

Change 336166 had a related patch set uploaded (by MusikAnimal):
Don't escape text in some messages so that admins can add links to external tools

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

Change 336245 abandoned by MusikAnimal:
Don't escape text in some messages so that admins can add links to external tools

Reason:
created in error

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

@MarcoAurelio Same issue, but for different messages. The above patch (https://gerrit.wikimedia.org/r/336166, ignore 336245) will allow markup in all messages in the edit interface except the checkboxes. Indeed those use the XML helpers so apparently it's not as straightforward of a fix.

Change 336168 abandoned by MusikAnimal:
Don't escape text in some messages so that admins can add links to external tools

Reason:
See https://gerrit.wikimedia.org/r/#/c/336166/

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

Change 336166 merged by jenkins-bot:
Don't escape text in some messages so that admins can add links to external tools

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

MusikAnimal reopened this task as Open.Mar 28 2019, 11:54 PM

The escaping apparently got re-added:

Not a big deal, just reporting it.

Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptMar 28 2019, 11:54 PM
Nirmos updated the task description. (Show Details)Mar 29 2019, 6:34 AM

@MusikAnimal Thanks for reporting. The culprit is this patch for T191039. The escaping itself wasn't altered, but I replaced the message "abusefilter-edit-status-profile" with "abusefilter-edit-status", and moved the content of the former for english. This was basically a revert of rEABF337cad30d9c66bbc09e3b5577e4d54fddbacc2c5. Messages in other languages have been moved to the new key per T191039#5051938, but on-wiki custom messages weren't (of course).
I'm unsure if there are other consequences, but for the moment I'm just changing the escaping to parse().

Change 499991 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Don't escape abusefilter-edit-status

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

Change 499991 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Don't escape abusefilter-edit-status

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

Daimona closed this task as Resolved.Mar 29 2019, 6:01 PM
Daimona removed a project: Patch-For-Review.