Bug 15898 - using document.importNode on XML node will lead to unpredictable stripping of attributes
Summary: using document.importNode on XML node will lead to unpredictable stripping of...
Status: RESOLVED DUPLICATE of bug 12187
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-08 07:20 PST by Sjoerd Mulder
Modified: 2007-11-08 12:21 PST (History)
1 user (show)

See Also:


Attachments
Testcase (501 bytes, text/html)
2007-11-08 07:20 PST, Sjoerd Mulder
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sjoerd Mulder 2007-11-08 07:20:08 PST
using importNode on XML document will lead to unpredictable stripping of attributes:

Testcase:


var oXml = new DOMParser().parseFromString('<div newAttr="Hello World"></div>', 'text/xml');
var oDiv = document.importNode(oXml.documentElement, true);
alert(oDiv.getAttribute('newAttr') == 'Hello World');
Comment 1 Sjoerd Mulder 2007-11-08 07:20:45 PST
Created attachment 17123 [details]
Testcase
Comment 2 Alexey Proskuryakov 2007-11-08 12:21:24 PST
See <http://bugs.webkit.org/show_bug.cgi?id=15276#c22> for a workaround.

*** This bug has been marked as a duplicate of 12187 ***