Page MenuHomePhabricator

Make external links protocols configurable
Closed, ResolvedPublic

Description

Author: Michael.Keppler

Description:
Currently the supported protocols in the external links parser are hardcoded
(function replaceExternalLinks in includes\parser.php). Please make them
configurable for the administrator so that he/she can add necessary protocols (I
added file:\\ and notes:\\ in our installation).


Version: 1.3.x
Severity: enhancement

Details

Reference
bz431

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 6:55 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz431.
bzimport added a subscriber: Unknown Object (MLST).

avarab wrote:

Both REL1_4 and HEAD have a URL_PROTOCOLS define in Parser.php that can be
expanded to allow for other protocols, markig it as FIXED.

Hacking core source files isn't what we normally mean by configurable. Should be
settable from LocalSettings.php without altering core files to satisfy this bug.

Might be worth tying bug 787 with this, to indicate for each allowed protocol whether it requires a
hostname part (http://example.com/) or not (news:alt.example).

  • Bug 2662 has been marked as a duplicate of this bug. ***

avarab wrote:

(In reply to comment #2)

Hacking core source files isn't what we normally mean by configurable. Should be
settable from LocalSettings.php without altering core files to satisfy this bug.

It is now, marking this as FIXED.

Michael.Keppler wrote:

*** Bug 3147 has been marked as a duplicate of this bug. ***

  • Bug 3133 has been marked as a duplicate of this bug. ***
  • Bug 1235 has been marked as a duplicate of this bug. ***

gangleri wrote:

How to do it?
see [[meta:Help:Configuration_settings_index#$wgUrlProtocols]]
http://meta.wikimedia.org/wiki/Help:Configuration_settings_index#.24wgUrlProtocols

  • Bug 4831 has been marked as a duplicate of this bug. ***
  • Bug 4894 has been marked as a duplicate of this bug. ***