Bug 13719

Summary: Setting an href or src DOM attribute to null does not give the same results as Firefox
Product: WebKit Reporter: Sam Weinig <sam>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, alice.barraclough, ap, bfulgham, magic, rniwa
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
An html page to manually check the several browsers none

Description Sam Weinig 2007-05-14 19:02:42 PDT
When setting an href or src DOM attribute (eg. HTMLLinkElement.href or HTMLIFrameElement.src) we set the attribute to the null string while Firefox sets it to a URL to the page it self.  We should investigate what IE does and decide which behavior is most appropriate.
Comment 1 Vincent Ricard 2007-08-20 04:18:05 PDT
Created attachment 16029 [details]
An html page to manually check the several browsers

This test case allows to set a full url or null to the href attribute. Then it displays the final value of the href.

When i click on "Set to null":
- with IE6 (XP, SP2) i get: "href is now:null"
- with FF 2.0.0.6 i get: "href is now:file:///C:/Documents%20and%20Settings/ricardvi/Desktop/13719.html" (which is the local url to the test case on my box)

Hope this test help to choice the behavior for webkit :)
Comment 2 Ahmad Saleem 2022-07-25 16:27:01 PDT
I am unable to reproduce this bug in Safari 15.6 on macOS 12.5 using attached test case.

From test case, setting "null" leads to following URL - https://bug-13719-attachments.webkit.org/null and all browser (Chrome Canary 106 and Firefox Nightly 104) do the same. I think this might have been fixed along the way and can be considered as "RESOLVED CONFIGURATION CHANGED". Thanks!