Last modified: 2011-04-30 01:20:45 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T26323, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24323 - Forbid external links to the wiki in wikitext
Forbid external links to the wiki in wikitext
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.15.x
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-09 22:12 UTC by Dan Barrett
Modified: 2011-04-30 01:20 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dan Barrett 2010-07-09 22:12:30 UTC
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]]."
Comment 1 Chad H. 2010-08-29 12:36:22 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links