Bug 16682 - Don't throw for ]]> with serializeAsCDATA
Don't throw for ]]> with serializeAsCDATA
Status: NEW
Product: WebAppsWG
Classification: Unclassified
Component: DOM Parsing and Serialization
unspecified
PC All
: P2 normal
: ---
Assigned To: Travis Leithead [MSFT]
public-webapps-bugzilla
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-10 13:16 UTC by Simon Pieters
Modified: 2014-10-04 16:36 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Pieters 2012-04-10 13:16:16 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
Comment 1 Simon Pieters 2012-04-10 13:21:29 UTC
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.