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

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

The escaping apparently got re-added:

Screen Shot 2019-03-28 at 7.51.42 PM.png (104×1 px, 38 KB)

Not a big deal, just reporting it.

@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