Page MenuHomePhabricator

Can not create "view-source:" links in wikitext
Closed, DeclinedPublic

Description

Author: sean

Description:
Normally, an html link of the form "view-source:http://example.com/" can be used to send many browsers (at least Chrome and FireFox, haven't tested others) to the rendering of the source for that page.

There appears to be no way to create a link in MW wikitext that allows a link to be created to those URLs.


Version: unspecified
Severity: normal

Details

Reference
bz15858

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:17 PM
bzimport set Reference to bz15858.
bzimport added a subscriber: Unknown Object (MLST).

fran wrote:

This is intended behavior, as $wgUrlProtocols controls which protocols can be used in internal links, and the view-source 'protocol' isn't in there by default.

Add this:

$wgUrlProtocols[] = 'view-source';

to LocalSettings.php and it'll work. :)