Rendering of '--' inside comments causing problems

RESOLVED INVALID

Status

()

RESOLVED INVALID
9 years ago
9 years ago

People

(Reporter: kevhussey, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 GTB5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 GTB5

I have a comment and occasionally will contain a '--'
like
<!-- Session ID: Zpl--kAdeVFthDyoSavLzCo --> 
this is causing problems, as I would have expected FF not to render this, due to no closing tag

Reproducible: Always

Steps to Reproduce:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
</head>
<!-- Session ID: Zpl--kAdeVFthDyoSavLzCo --> 
<body class="ampau">Test</body>
</html>
Actual Results:  
display of <!-- Session ID: Zpl--kAdeVFthDyoSavLzCo --> Test

Expected Results:  
Test

If I take this line out it renders as expected
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Comment 1

9 years ago
http://www.w3.org/TR/html401/intro/sgmltut.html#idx-HTML

"A common error is to include a string of hyphens ("---") within a comment. Authors should avoid putting two or more adjacent hyphens inside comments."
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → INVALID
HTML 5 says "--" isn't allowed inside of comments.

http://www.whatwg.org/specs/web-apps/current-work/#comments
You need to log in before you can comment on or make changes to this bug.