Bugzilla – Bug 16682
Don't throw for ]]> with serializeAsCDATA
Last modified: 2012-10-30 17:11:58 UTC
http://html5.org/specs/dom-parsing.html#concept-serialize-xml - instead of throwing for ]]> in text node with serializeAsCDATA, i think you should serialize a cdata section up to the first "]]>" not including the ">", then emit the rest (including the ">") as text
Rationale: throwing when not strictly needed seems not nice. The previous spec text in HTML said to not throw for this case (but didn't define exactly what to do). The proposed behavior works nice with streaming and isn't overly complicated.