Closed Bug 293423 Opened 20 years ago Closed 20 years ago

Dashes parsed incorrectly within HTML comments

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: choinet, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3

Using two or more dashes in succession "--" within <!-- --> comments causes the
comment to end prematurely, leaving the rest of the comment exposed for
rendering within the browser.

Reproducible: Always

Steps to Reproduce:
1. Create an HTML page with the following code:

<!--
Hello world -- this is a test
-->
Actual Results:  
-- Hello world -- this is a test -->

Expected Results:  
Display nothing

Using four or five dashes in a row hides the comment. It alternates depending on
the number of success dashes.
see http://www.w3.org/TR/html401/intro/sgmltut.html#h-3.2.4

-> invalid
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.