Opened 15 years ago
Last modified 10 years ago
#1029 closed bug
$().html() serializes href attribute in IE — at Initial Version
Reported by: | brandon | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.1.3 |
Component: | core | Version: | 1.1.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Take the following text (snippet): <a href="/?q=node/1" rel="bookmark" title="Permanent Link to windows">
Load into an existing DOM using the following (val.primarylinks contains the above text): $("#primarylinks").hide().html(val.primarylinks).show();
The text is changed to: <a href="http://www.mydomain.com/?q=node/1" rel="bookmark" title="Permanent Link to windows">
As you can see, the href is being changed into an absolute path. I attempted to debug the script in vs2005 and it appears that the text actually changes during the "clean" function at this line: div.innerHTML = wrap[1] + s + wrap[2];
I'm no expert but it seems the assignment to innerHTML does some processing??? Assigning to innerText does not alter the string.