Page MenuHomePhabricator

Forbid external links to the wiki in wikitext
Closed, DeclinedPublic

Description

Novice users like to write http://mywiki.com/wiki/My_article instead of [[my article]]. Provide a global variable, $wgForbiddenExternalLinks, that prevents this from working.

// Array of regexps
$wgForbiddenExternalLinks = array();
$wgForbiddenExternalLinks[] = "http://mywiki.com/wiki/.*"

When a user writes http://mywiki.com/wiki/My_article or [http://mywiki.com/wiki/My_article foo], the link itself is not rendered. A system message Mediawiki:forbiddenexternalinks is displayed, defaulting to "Don't use external links to yourself; use internal link syntax, [[article name]]."


Version: 1.15.x
Severity: enhancement

Details

Reference
bz24323

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 11:04 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz24323.
bzimport added a subscriber: Unknown Object (MLST).

External links to the wiki are perfectly valid, if not pretty :p

This is a new blacklist in disguise. If you want to blacklist these sorts of self-links, it should be possible to utilize one of the existing ones or the AbuseFilter or something.

This is attempting to fix a documentation/social issue with a technical solution. WONTFIX.