Base URL is ignored when copy/open links in HTML attributes
Categories
(DevTools :: Inspector, defect, P3)
Tracking
(Not tracked)
People
(Reporter: lorenzo.stanco, Unassigned)
Details
Attachments
(1 file)
|
119.56 KB,
image/gif
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0
Steps to reproduce:
Open the inspector on a web page with a <base href> that modifies the default base URL of the document. Now pick, for example, an <img src> with an URL relative to the base: middle-click or right-click the URL and choose to open in a new tab or copy in the clipboard.
Actual results:
The URL that is opened or copied is incorrect, since is created by merging the document URL and the HTML attribute, ignoring the overridden base URL.
Expected results:
The URL should have been created by merging the correct base URL and the relative URL in the HTML attribute.
Comment 1•6 years ago
|
||
Hi Lorenzo, thanks for filing.
Would you mind providing a test case (a sample HTML page or URL) to reproduce this problem?
| Reporter | ||
Comment 2•6 years ago
|
||
| Reporter | ||
Comment 3•6 years ago
|
||
(In reply to Patrick Brosset <:pbro> from comment #1)
Would you mind providing a test case (a sample HTML page or URL) to reproduce this problem?
Sure, here it is: https://www.lorenzostanco.com/stack/ffbug2.html
I attached a GIF showing the incorrect behaviour (Italian locale, but that's it).
Comment 4•6 years ago
|
||
Seems like the URL resolver in the Inspector actor should make use of document.baseURI instead of document.location.href.
Updated•3 years ago
|
Description
•