“Open all external links in a new tab” option does not work for protocol agnostic links

This is easy to reproduce now.

http://try.discourse.org/t/open-links-in-external-window-test/344

It is because the first two links are using protocol agnostic URLs, they do not start with http: or https: and instead start with //

try.discourse.org is temporary, so here is the code to reproduce the issue

[MusicBrainz's community](//community.metabrainz.org/t/do-i-have-to-hit-the-save-button-after-scanning-music-in-picard/20489/3?u=jesus2099) - won't open in new window.

[Discourse 1.6.0.beta1](//github.com/discourse/discourse/commit/1481b3420ec1fa8514a9f37ec8947d91b9642731) - won't open in a new window

------------------------

[MusicBrainz's community](https://community.metabrainz.org/t/do-i-have-to-hit-the-save-button-after-scanning-music-in-picard/20489/3?u=jesus2099) - will open in new window.

[Discourse 1.6.0.beta1](https://github.com/discourse/discourse/commit/1481b3420ec1fa8514a9f37ec8947d91b9642731) - will  open in a new window
6 Likes

Finally, an actual bug! It is a miracle :angel:

1 Like

Ok, let’s see how hard this one is :wink:

:bug: :gun:

EDIT: Just pushed a fix

https://github.com/discourse/discourse/commit/6ee11adf58d247d004ed838520d99281ce6426cb

5 Likes

Leaving this open for a bit to keep track of the spots open links in new tabs is not working.

I can’t know if your post did include sarcasm but, FTR, if you had read carefully my bad english, this bug was presented in the two deleted topics. :slight_smile:

Now can you tell me where the history plugin bug tracker is, so I can report the second bug improvement?

It’s not a plugin, it’s part of core. You can report bugs (with detailed reproduction steps) here in the #bug category :wink:

Sorry this topic was left open incorrectly.