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 16807 - Consider supporting ending comments with --!> in prescan. (The dashes can't overlap with <!--, though.)
Summary: Consider supporting ending comments with --!> in prescan. (The dashes can't o...
Status: RESOLVED WONTFIX
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-20 13:38 UTC by contributor
Modified: 2012-09-16 03:42 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2012-04-20 13:38:44 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html
Multipage: http://www.whatwg.org/C#documentEncoding
Complete: http://www.whatwg.org/c#documentEncoding

Comment:
Consider supporting ending comments with --!> in prescan. (The dashes can't
overlap with <!--, though.)

Posted from: 85.227.154.145 by simonp@opera.com
User agent: Opera/9.80 (Macintosh; Intel Mac OS X 10.7.3; U; en) Presto/2.10.229 Version/11.62
Comment 1 Ian 'Hixie' Hickson 2012-04-20 18:37:34 UTC
Unless there's a compelling reason to do so, I can't see my considering this for very long...
Comment 2 Simon Pieters 2012-04-20 19:30:05 UTC
It would make the prescan find charset declarations after <!-- --!> comments, which prevents scripts from running twice if the parser decides to change the encoding...

$ grep -aEihzZB2 "<\!-[-]([^-]|-[^-]|-[-][^>])*-[-]\!>.+text/html[[:space:]]*;[[:space:]]*charset[[:space:]]*=" web200904 > bang-comment-then-encoding.txt

Seems only two pages in this data set match, but they have an encoding decl before the comment as well.
Comment 3 contributor 2012-07-18 17:21:44 UTC
This bug was cloned to create bug 18124 as part of operation convergence.
Comment 4 Ian 'Hixie' Hickson 2012-09-16 03:42:10 UTC
Yeah, that's not very compelling. :-)

The change to the spec would be relatively minor (just adding some more complexity to the "A sequence of bytes starting with: 0x3C 0x21 0x2D 0x2D (ASCII '<!--')" branch of the prescan algorithm), but it seems annoying to implement.

I'm marking this WONTFIX. If you think I made the wrong call here, please reopen the bug. Especially if that's because you are implementing the algorithm and would rather support --!> than not support it.