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 25602 - Double hyphens validation issue
Summary: Double hyphens validation issue
Status: RESOLVED WORKSFORME
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-08 10:40 UTC by Nicolas H.
Modified: 2015-08-23 07:07 UTC (History)
1 user (show)

See Also:


Attachments

Description Nicolas H. 2014-05-08 10:40:10 UTC
Hi,

I've had this message when trying to validate a file :  

"Consecutive hyphens did not terminate a comment. -- is not permitted inside a comment, but e.g. - - is"
with also 
"The document is not mappable to XML 1.0 due to two consecutive hyphens in a comment."

To reproduce, put this HTML code in "Direct input validation" in the http://validator.w3.org/

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" class="no-js">

<head>
<meta charset="utf-8" />
<title>Test</title>
<!--
<style>
.block--element {
color : #000;
}</style>
-->

</head>
<body role="document" class="home">

<!--[if lte IE 8]> <div class="block--element">blabla</div> <![endif]-->

</html>

It will provide two times the error mentionned above. 

It is problematic for people that are using BEM convention in CSS and conditionnal comments or simple comments.

(note that it is not breaking display, only validation)

I don't know what it could imply, is it possible to fix this annoying issue ?


Kind regards,
Nicolas
Comment 1 Michael[tm] Smith 2014-05-11 10:07:21 UTC
That error message from the validator is required by the HTML spec. The HTML spec doesn't permit comments to contain two consecutive hyphens:

http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#comments

So to ask for that requirement to changed you'd need to file a bug against the HTML spec:

https://www.w3.org/Bugs/Public/enter_bug.cgi?product=WHATWG&component=HTML
Comment 2 Nicolas H. 2014-05-30 14:08:24 UTC
Hi Michael,

ok, I've reported it for HTML spec.

Thanks for your help and your time. :)