External links in quoted text don’t follow “Open all external links in a new tab” setting

AI-generated summary

The discussion addresses a bug where external links within quoted text do not respect the “Open all external links in a new tab” setting in Discourse. jesus2099 reports that while some links open in a new tab, others, particularly those inside quotes, open in the current tab, as observed on MetaBrainz. After testing with nested quotes, jesus2099 confirms the issue persists. cpradio suggests the problem may stem from a specific code commit that exits early, preventing the setting from being applied. zogstrip notes that all links worked as expected in their test, indicating the issue may be inconsistent or context-dependent.

I am sorry to always post related to that same option, over and over…

I have noticed that, as always, on MetaBrainz’s which runs a rather updated version but I am now checking if it bugs here too.

Here is the external link that opens in a new tab.
https://www.videolan.org/videolan/partners.html

This is the same external link inside a quoted text, let us see if it works.
Our partners - VideoLAN
At MetaBrainz’s it opens in the current tab.

Oh, it worked.
Let’s try with a full quote now:

OK so some quoted links are not taking the option in account.
This bug does exist.

I think this has to do with
https://github.com/discourse/discourse/commit/ad15049ef0446c43616267e8ba0dac84e6714923

As it is exiting out before it can get to the point where it reads the external window setting.

7 likes

Good catch! :slight_smile: Thank you.

Just tried and all the links opened in a new tab.

2 likes