Forum software converts plain HTTP links to HTTPS

See for example Mopidy-dLeyna - Warning message "Cannot access media server" and Installing mpd-watchdog in Pi MusicBox using apt-get?
This is quite annoying and may cause confusion if the linked site does not support HTTPS.

I’ve looked into this twice now. I can reproduce. I cannot find anything in the discourse forums about this. We currently run the latest version, so there’s no upgrade that hopefully will fix this.

Well, thanks for looking into that :wink:

Testing, testing…

I’ve now spent another couple of hours on this.

I’ve applied another ~100 commits of Discourse improvements, without seeing any change in behavior.

I’ve searched a bit more for similar problems, without finding anything that seems related.

I’ve tried turning on “track external right clicks” so that all external links are rewritten to go through a redirect script, and then I rebuilt the HTML for the above test post, without seeing any change in the links. The hope was that this would use an entirely different code path when clicking links.

I’ve searched around in the page’s JavaScript for “https” and added breakpoints on functions that might be triggered when clicking the link. Didn’t get much wiser, but the problem should be solvable if digging deep enough here.

Not motivated to dig more right now, but I think this is a really stupid bug to have which we should get rid of.