Closed Bug 82261 Opened 24 years ago Closed 24 years ago

Incorrect handling of DOCTYPE declaration

Categories

(Core :: DOM: HTML Parser, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 44340

People

(Reporter: megabyte, Assigned: harishd)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9+) Gecko/20010522 A comment formed like a DOCTYPE will be interpreted as the DOCTYPE of the document even if the real DOCTYPE follows. The following code, noted in bug 47165 as a work-around, renders as HTML 4.01 in Mozilla, but is interpreted as XHTML 1.0 in the W3C validator. <!--!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
This is a known bug that I've been bugging rickg about since last summer and which he didn't consider a bug. I had a patch to rewrite doctype parsing but he didn't want it, and it's since become outdated.
Assignee: karnaze → harishd
Status: UNCONFIRMED → NEW
Component: Layout → Parser
Ever confirmed: true
QA Contact: petersen → bsharma
Summary: Incorrect handling of DOCTYPE tag → Incorrect handling of DOCTYPE declaration
*** This bug has been marked as a duplicate of 44340 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
QA Contact: bsharma → moied
You need to log in before you can comment on or make changes to this bug.