Closed
Description
Version
3.6.5
Reproduction link
Steps to reproduce
Click on Link A or open Link B in a new tab.
And check the generated href attribute in the inspector.
What is expected?
In hash mode, the following results are logical, I would prefer the last one, because the HashHistory
is not related to the baseURI
and the availability of the <base>
source is unknown.
// "https://example.com/root/rel/path#/bar"
new URL("#/bar",document.baseURI).href
// "https://example.com/root/main.html#/bar"
new URL("#/bar",location).href
// If location.href and document.baseURI are same-origin or both paths are the same,
// it is possible to slice the generated URL to shorten it.
What is actually happening?
The generated href attributes are all "/./rel/path#/foo/#/bar"
.
Both the relative path and the hash of Link A are not handled correctly.
Link B has the same issue when opened in a new tab.
Metadata
Metadata
Assignees
Labels
No labels