The link in the edit note should point to https://...
Why do not we use links starting from slash /... ?
We would not have to check every this or that.
It depends on the place, and what the link is to. For this particular task, that probably would work (it's not how I did it – I used scheme-independent links, i.e. '//$server/$path' – but that's not important), but for example linking to the wiki (on a different domain) does require using the // syntax or manually detecting the https vs. http. Coverart is another example of a place where, since we're linking to external domains that may or may not support https, we need to know what the domain supports and be explicit about the protocol used.