Last modified: 2014-09-24 06:23:16 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 T73166, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71166 - Add "view-source://" to wgUrlProtocols
Add "view-source://" to wgUrlProtocols
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-23 06:40 UTC by David Condrey
Modified: 2014-09-24 06:23 UTC (History)
2 users (show)

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


Attachments

Description David Condrey 2014-09-23 06:40:30 UTC
MediaWiki external link syntax parsing does not appear to support the view-source [URI schemes][1] potentially others as well. [Live example][2].

Here, I attempted to add an external link directly to view the source of a webpage to validate the licensing of a public domain image but the link renders only the rendered HTML page link.

In HTML an anchor tag can be assigned a view-source link like so..[ref][3]

    <A HREF="view-source://...>

and MediaWiki documents external linking syntax to be like so..

    [href value|visible text]

I attempted to add the external wikilink

    // should be the accurate value
    [view-source:sacred-texts.com/nam/nw/tmt/index.htm][4]
    
    // doesn't seem accurate because view-source and http are both defining the URI scheme but this is how it works if you copy/paste it into the address bar
    [view-source:http://sacred-texts.com/nam/nw/tmt/index.htm][5]
    
    // tried a few other variations as well
    [view-source://sacred-texts.com/nam/nw/tmt/index.htm][6]
    [view-source://http://sacred-texts.com/nam/nw/tmt/index.htm][7]

[1]: https://en.wikipedia.org/wiki/URI_scheme#Official_IANA-registered_schemes
[2]: https://en.wikipedia.org/wiki/Talk:Raven_Tales#Undeletion_of_image_requested
[3]: http://ccd.uab.es/recursos/manualhtml/Anchors/anchor.htm
[4]: view-source:sacred-texts.com/nam/nw/tmt/index.htm
[5]: view-source:http://sacred-texts.com/nam/nw/tmt/index.htm
[6]: view-source://sacred-texts.com/nam/nw/tmt/index.htm
[7]: view-source://http://sacred-texts.com/nam/nw/tmt/index.htm
Comment 1 James Forrester 2014-09-23 20:01:16 UTC
This is simple to do; no particular view either way on whether we should.
Comment 2 Bawolff (Brian Wolff) 2014-09-24 05:48:10 UTC
I was going to object on the basis it wasn't an official registered uri schema, but apparently it is.

So I'm going to object on the basis of lack of support on IE7+. If these sorts of urls don't work for random segments of the population, with probably a very unclear error message, I think that's a bad thing. This argument of course is pretty weak given how well gopher:// is supported these days.

(To clarify, are you just asking for wikimedia wikis, or mediawiki in general? It should be noted that which urls mediawiki supports is configurable in LocalSettings.php if you're a third party wiki).

So to summarize, I'm mildly opposed on the basis it feels odd and icky to me, but I don't really have a coherent argument against, so if someone else wants to do it, I won't object.
Comment 3 jeremyb 2014-09-24 06:23:16 UTC
(In reply to Bawolff (Brian Wolff) from comment #2)

+1

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


Navigation
Links