document.createComment("--") fails

RESOLVED DUPLICATE of bug 412257

Status

()

Core
DOM
RESOLVED DUPLICATE of bug 412257
6 years ago
6 years ago

People

(Reporter: pomax, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
Not sure where to file this bug, as there doesn't appear to be a "JS API" category for firefox.

The following javascript fails with an error being thrown, even though there is no reason for it to:

    document.createComment("--");

In fact, any comment text with -- in it somewhere will lead to firefox throwing an error.

However, firefox will happily parse actual HTML source that has '--' somewhere between <!-- and -->, and neither Chrome, Opera or IE throw errors when passed a comment string with '--' in it. It looks like this is a bug left in from how comments used to be parsed back in the day.

Updated

6 years ago
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Component: Untriaged → DOM
Product: Firefox → Core
QA Contact: untriaged → general
Resolution: --- → DUPLICATE
Duplicate of bug: 412257
You need to log in before you can comment on or make changes to this bug.