This is the task tracking implementation of T276857, but specifically against blocked domains (i.e. spamblacklist) and only for the 2010 editor (WikiEditor).
Background
This was the the #10 most-voted wish in the Community-Wishlist-Survey-2023. That wish specifically asked for this functionality in VisualEditor, but we'd like non-VE users to benefit from the feature, too.
The core issue is some users will link to a blocked/spamblacklisted domain, and they won't get notified about it until they actually go to publish the edit. It would be more convenient for them to be informed the URL cannot be used as soon as they add it, i.e. so they can find a more reliable reference.
As part of T337431, we now have a new system called BlockedExternalDomains that is intended to later supersede SpamBlacklist. Thus, the work for this task will only be for the new system. It does not yet have full feature parity with Spamblacklist, but will in the future. For now, we're just going to check raw URLs against MediaWiki:BlockedExternalDomains.json.
Acceptance criteria
- Enable the feature by setting the $wgAbuseFilterBlockedExternalDomainsNotifications flag to true.
- In the 2010 editor, if I type a URL to a blocked domain, I should get a notification warning me of such.
- The notification should state what domain is blocked, and have a "Review link" link that once clicked will highlight the offending URL in the wikitext.
- If WikiEditor is installed (true for all WMF projects), it should open the link in the link insertion dialog.
- If using the WikiEditor link insertion dialog, I should also be informed if the URL I entered is blocked.
- Currently this only happens after the link is inserted, which I think is fine at least for the MVP...
Note this is very similar to what we did for T285508: Show notification when users type a link to a disambiguation page.