Fix pathname from anchor element's URL
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox112 | --- | fixed |
People
(Reporter: cybai, Assigned: cybai)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/110.0
Steps to reproduce:
Based on the test result in url/a-element-xhtml.xhtml?include=javascript
and friends, currently, most of the tests fail because the pathname doesn't match.
Actual results:
When anchor element's href is javascript:/example.com/
, its pathname is empty string now.
Expected results:
When anchor element's href is javascript:/example.com/
, its pathname should be /example.com/
.
Assignee | ||
Comment 1•2 years ago
|
||
I've figured out how to fix it. I will send a patch.
Assignee | ||
Comment 2•2 years ago
|
||
nsIURI
fails to cast to nsIURL
so we used to get a nil url and
return empty string for pathname. As we're able to get the pathname
information from URI, I wonder we can just use it directly without
casting to nsIURL. With doing so, we can fix the issue.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 4•2 years ago
|
||
bugherder |
Description
•