Page MenuHomePhabricator

Add a magic word for the document protocol
Closed, DeclinedPublic

Description

Author: theevilipaddress

Description:
A magic word, like {{PROTOCOL}}, which shows if we use http or https would be quite useful. For links to the own site, this isn't necessary, since we have fullurl, but for certain external links. For example, there are sites which have a http and a https version, and with the magic word the user could then be directed to the https version if they prefer this protocol.


Version: 1.23.0
Severity: enhancement

Details

Reference
bz26623

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 11:15 PM
bzimport set Reference to bz26623.
bzimport added a subscriber: Unknown Object (MLST).

If I understand your request properly, you want to see different styles for http and https links?

Why a magic word? The parser can see whether http or https is being used.

Currently there is no visual difference in links. Test:

[http://test.org http] - [https://test.org https]

It sounds like you're asking for a parser function that emits "http" when viewed from "http://wiki.example/Some_page", and "https" from "https://wiki.example/Some_page". This would break parser caching, and so can't be done. However, if your goal is just to make links use the same protocol you're currently on, you can use the syntax [//google.com Google], and the protocol used will be the one the page was viewed with.