This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 10456 - Should not emit ]] or ] when ]]EOF or ]EOF appears in the CDATA section state
Summary: Should not emit ]] or ] when ]]EOF or ]EOF appears in the CDATA section state
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: Other All
: P1 critical
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-26 13:44 UTC by Henri Sivonen
Modified: 2010-10-04 14:47 UTC (History)
4 users (show)

See Also:


Attachments

Description Henri Sivonen 2010-08-26 13:44:48 UTC
I'm unhappy to see these tests results:
Failure.
Data:
<svg><![CDATA[]]
Expected:
| <html>
|   <head>
|   <body>
|     <svg svg>
|       "]]"
Got: 
| <html>
|   <head>
|   <body>
|     <svg svg>
Expected errors:
Actual errors:
5: Start tag seen without seeing a doctype first. Expected <!DOCTYPE html>.
16: End of file in a foreign namespace context.
Failure.
Data:
<svg><![CDATA[]
Expected:
| <html>
|   <head>
|   <body>
|     <svg svg>
|       "]"
Got: 
| <html>
|   <head>
|   <body>
|     <svg svg>
Expected errors:
Actual errors:
5: Start tag seen without seeing a doctype first. Expected <!DOCTYPE html>.
15: End of file in a foreign namespace context.

The tests are correct per spec, but I think the V.nu behavior should be made correct, because so far we've adhered to the principle that a premature EOF shouldn't cause tokens to be emitted if those tokens wouldn't be emitted if the file had been seen to completion.
Comment 1 Ian 'Hixie' Hickson 2010-09-25 16:28:01 UTC
How is this different from:

   <[EOF]     (vs <p>)
   </[EOF]    (vs </p>)
   &[EOF]     (vs &lt;)

...?

Is the request here to change the CDATA section state to ignore one or two trailing "["s if an EOF was seen? That seems odd. We only make EOF drop stuff if we would otherwise always have eventually returned a non-character token yet the end of the token had not been seen yet. In this case, first the ]]> doesn't correspond to a token, and secondly if the next character adter "]]" is not ">", then the "]]" would be emitted as characters. So I'm not sure that what you describe makes sense.
Comment 2 Ian 'Hixie' Hickson 2010-09-29 07:35:33 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: see comment 1