- Affected components: Parser (MediaWiki core).
- Engineer for initial implementation: Parsing Team (WMF).
- Code steward: Parsing Team (WMF).
Motivation
Background
Magic links are a feature of MediaWiki core that create automatic links for 3 hardcoded external identifiers:
- ISBN 0-7475-3269-9 -> ISBN 0-7475-3269-9
- PMID 1234 -> PMID 1234
- RFC 1234 -> RFC 1234
See also: https://en.wikipedia.org/wiki/Help:Magic_links.
For the purposes of this RFC, we are considering free external links (e.g. typing just "https://www.example.org") to not be a "magic link".
Problem
These three magic links are hardcoded, inflexible, un-localizable (T15335), and generally unexpected. If this feature were proposed today, it would be rejected in favor of using templates or interwiki links. There have been long standing requests to make them disable-able (T47942), move them to an extension (T28207), or remove them outright (T136342).
In many cases, local templates are preferable and more advanced than magic links. For example, on the English Wikipedia, Template:ISBN checks for invalid ISBNs and adds them to a tracking category for editors to fix up.
Requirements
Plain text that does not involve some kind of syntatical grammar (such as {{ or <), must not have rich text side-effects.
Exploration
The RFC proposes three steps:
- Disable the magic link functionality by default for the MediaWiki 1.28 release, and mark it as deprecated. (approved in E287)
- Deprecate magic links on Wikimedia wikis (e.g. Wikipedia), providing alternatives for this functionality and tools to aid the migration. We agreed to start building these tools in E287.
- Disable magic links functionality a year or so after the MediaWiki 1.28 release (in time for the next MediaWiki LTS release)