Closed Bug 98149 Opened 23 years ago Closed 15 years ago

Comments in SGML derived tags are not shown as such in view source

Categories

(Core :: DOM: HTML Parser, defect)

x86
Linux
defect
Not set
trivial

Tracking

()

RESOLVED WONTFIX
Future

People

(Reporter: 2009-bugzilla, Unassigned)

References

Details

Attachments

(2 files)

Go to the attachment and take a look at the source code. (CTRL+U) According the HTML 4.01 specifications a comment looks like this : <!-- Comment -- Here it's NOT a comment -- Comment again --> This shows up for example in the DTD's : <!ENTITY % HTML.Version "-//W3C//DTD HTML 4.01 Transitional//EN" -- Typical usage: etc.... etc... ... --> However an ENTITY is entirely cyan, and a Comment is entirely green - even in non-Comment and Comment-space. This bug is trivial. It isn't even trivial, it's less than that. But it should be noted somewhere. And should get fixed until Mozilla 2.0 =) if ever.
Attached file Testcase
Whiteboard: [ignoreme]
Target Milestone: --- → Future
*** This bug has been marked as a duplicate of 57724 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
I'm impressed =)
Status: RESOLVED → VERIFIED
SPAM. HTML Element component deprecated, changing component to Layout. See bug 88132 for details.
Component: HTML Element → Layout
Reopening 57724 dependencies for independent resolution.
Status: VERIFIED → REOPENED
Depends on: 57724
Resolution: DUPLICATE → ---
Whiteboard: [ignoreme]
AFAICR this has been fixed. But as for now I can't confirm it. Mozilla always hangs when trying to view the testcase (filed as Bug 123723)
->Parser, I think
Assignee: clayton → harishd
Status: REOPENED → NEW
Component: Layout → Parser
QA Contact: bsharma → moied
Tweaking summary to be more descriptive.
Summary: "Display Source" shows wrong colors for HTML 4.01 documents → Comments in SGML derived tags are not shown as such in view source
I think this bug can't be fixed without parsing SGML comments correctly, which I think can't be done. Since the beginning of HTML it's been said that a comment start tag is <!-- and a comment end tag is -->, which is not true of course, but it's what's been used. So, for example, anyone who marks a section with this: <!----------section header-------------> will most likely comment out the rest of their page, unless they've counted the hyphens! There are probably many situations where people have double hyphens "in" their comments. Although it would be neat to be an SGML parser, I think the main purpose is to be an HTML parser and, going forward, an XML parser.
Except for the fact that we do parse HTML comments as SGML says we should in strict mode, how we parse HTML comments has very little to do with this bug, which is about coloring comments in SGML productions (such as <!DOCTYPE>) properly in view-source.
Assignee: harishd → parser
QA Contact: moied → mrbkap
Assignee: parser → nobody
QA Contact: mrbkap → parser
Tracking HTML5 now for parsing. Not SGML. See also http://ln.hixie.ch/?start=1137799947&count=1
Status: NEW → RESOLVED
Closed: 23 years ago15 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: