Closed Bug 1830556 Opened 2 years ago Closed 2 years ago

Copy Link Location fails to copy a link with the explicit protocol "http(s)://" missing in the href attribute value

Categories

(Thunderbird :: Untriaged, defect)

Thunderbird 102
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: xixic37604, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 OPR/97.0.0.0

Steps to reproduce:

Thunderbird Version: 102.10.1 (newest Windows 10–compatible release at the time of writing)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101

  1. Open the email message attached in this bug report in Thunderbird.
  2. Right-click the link in the message where it says "Answers to the most frequently asked questions / Contact: www.crucial.com/support" and select Copy Link Location.

Actual results:

The link was not copied to the clipboard.

Developer Tools Console displays the following error:
"An error occurred executing the cmd_copyLink command: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIController.doCommand]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://global/content/globalOverlay.js :: goDoCommand :: line 128" data: no] globalOverlay.js:131
goDoCommand chrome://global/content/globalOverlay.js:131
oncommand chrome://messenger/content/messageWindow.xhtml:1"

Expected results:

The link should've been copied to the clipboard.

I'm not sure that's to be considered a bug. A raw <a href="www.crucial.com/support"> in the source is really invalid.

(In reply to Magnus Melin [:mkmelin] from comment #1)

I'm not sure that's to be considered a bug. A raw <a href="www.crucial.com/support"> in the source is really invalid.

I suppose you're correct. While most browsers digest such links without complaints, it indeed seems the scheme, a colon and a pair of forward slashes are mandatory to construct an absolute URI.

(In reply to xixic37604 from comment #2)

(In reply to Magnus Melin [:mkmelin] from comment #1)

I'm not sure that's to be considered a bug. A raw <a href="www.crucial.com/support"> in the source is really invalid.

I suppose you're correct. While most browsers digest such links without complaints, it indeed seems the scheme, a colon and a pair of forward slashes are mandatory to construct an absolute URI.

Actually, on the second thought, "most browsers", if any, don't. Instead, a link with a missing scheme is simply appended at the end of the current URI, as per HREF attribute definition. I stand corrected.

In the address bar yes, but not for clicking links

Does this also reproduce when using version 115 started in Help > Troubleshoot Mode?
If it does, and you have not already done so, please list complete steps to reproduce.

Whiteboard: [closeme 2023-10-01]

Resolved per whiteboard

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
Whiteboard: [closeme 2023-10-01]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: