Closed Bug 396793 Opened 17 years ago Closed 17 years ago

Comments containing two consecutive hyphens are not parsed correctly.

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 214476

People

(Reporter: djain, Unassigned)

Details

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser; SV1; Avant Browser; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7 In the presence of a document type definition, Firefox prematurely ends comments that contain two consecutive hyphens (--) at the next greater sign (>) that is encountered. Note that there can be arbitrarily many characters between "--" and ">" in the comment. Everything after the ">" will be rendered even though the comment has not been ended. The concrete type used in the doctype definition does not seem to matter. Reproducible: Always Steps to Reproduce: Render a page such as this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <body> <!-- <a href="x.php?name=foo--bar">error</a> --> Test. </body> </html> Actual Results: In this example, "error --> Test." is rendered. Expected Results: Only "Test." should be rendered. Other browsers do not exhibit this behaviour.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.