Bug 11772

Summary: REGRESSION: XMLSerializer.serializeToString incorrect value for CDATA nodes
Product: WebKit Reporter: Jesse Costello-Good <jesse>
Component: XMLAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: ap
Priority: P1 Keywords: HasReduction, Regression
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Bug Depends on:    
Bug Blocks: 10489    
Attachments:
Description Flags
naive fix timothy: review+

Description Jesse Costello-Good 2006-12-06 17:15:32 PST
var d = window.document.implementation.createDocument("", "", null);
var n = d.createCDATASection("-- cdata --");
var s = (new XMLSerializer()).serializeToString(n)
assertEquals("<![CDATA[-- cdata --]]>", s);  // in current WebKit build s is equal to ""
Comment 1 Alexey Proskuryakov 2006-12-06 21:47:26 PST
Confirmed as a regression.
Comment 2 Alexey Proskuryakov 2006-12-07 10:39:36 PST
This has regressed more than once already - with r12009 (January 2006), the result was "<#cdata-section/>".
Comment 3 Alexey Proskuryakov 2006-12-07 11:21:05 PST
Created attachment 11764 [details]
naive fix
Comment 4 Alexey Proskuryakov 2006-12-08 10:16:03 PST
Committed revision 18076.