Closed
Bug 2749
Opened 26 years ago
Closed 24 years ago
Comments are incorrectly parsed: <!-- -- --> inside comment! <!-- -- -->
Categories
(Core :: DOM: HTML Parser, defect, P2)
Tracking
()
VERIFIED
FIXED
mozilla0.9
People
(Reporter: ian, Assigned: harishd)
References
()
Details
(Keywords: regression, testcase, Whiteboard: [19990901])
Attachments
(4 files)
Comment delimiters are "--" while inside tags.
Thus: <!-- in -- -- in -- -- in -->
where "in" shows what is commented.
On the test page quoted, all is explained.
Updated•26 years ago
|
Comment 1•26 years ago
|
||
fixed the URL to what was intended
Reporter | ||
Updated•26 years ago
|
Reporter | ||
Comment 2•26 years ago
|
||
Eek! Thanks.
Reporter | ||
Updated•26 years ago
|
Whiteboard: Test: Need to update test page - ieh
Reporter | ||
Comment 3•26 years ago
|
||
Incidentally, the test page doesn't (yet) test this:
<A name=abc -- href="comment" --> </A>
That is, "--" delimiters also delimit comments inside element tags. Thus the
above should be parsed as:
<A name=abc > </A>
...and the following:
<A -- href="hello.my. -- name=fred -- /world.com"--> </A>
...should be parsed as:
<A name=fred > </A>
...and the following:
<DEL datetime="1999-01-30T1325Z" --> Never mind. --> </DEL>
...should be parsed as:
<DEL datetime="1999-01-30T1325Z" > </DEL>
Eventually I'll add these to the test page quoted above.
Comment 4•26 years ago
|
||
Are you sure about those examples above, Ian? I think the -- only applies when
one is within SGML processing instructions, i.e, <! ... >, not any old tags. I
don't have a copy of any SGML standard (I think it's on paper only!), so I'm
not sure. But nsgmls (via http://www.htmlhelp.com/tools/validator/) agrees
with me.
Reporter | ||
Updated•26 years ago
|
Whiteboard: Test: Need to update test page - ieh
Reporter | ||
Comment 5•26 years ago
|
||
If nsgmls says I'm wrong, then I'm wrong.
The SGML spec is indeed paper only, I was basing my assertion on what
I could remember of a tutorial I read a few months back. Please therefore
disregard anything I previously said about comments in any old tags.
Reporter | ||
Updated•26 years ago
|
Severity: minor → major
Priority: P4 → P2
Summary: Comments are incorrectly parsed: <!-- -- --> inside comment! <!-- -- --> → Comment parsing VERY broken: -> should not terminate comment!
Whiteboard: Less Serious Summary: Comments are incorrectly parsed: <!-- -- --> inside comment! <!-- -- -->
Reporter | ||
Comment 6•26 years ago
|
||
See the end of the quoted test page:
http://www.bath.ac.uk/%7Epy8ieh/internet/eviltests/comments-evil.html
Basically, "->" is terminating comments, instead of "--".
This is causing pages to break, for example:
http://www.bath.ac.uk/%7Esu0bufs/
...has its comment visible at the top!
Fixed by update to comment parsing. We should now be handling common practice of
comments correctly now, but still not to spec. That won't get enabled until we
actually have a strict dtd.
Updated•26 years ago
|
QA Contact: 4141
Reporter | ||
Comment 9•26 years ago
|
||
Will not verify until strict parsing mode enabled.
Reporter | ||
Updated•26 years ago
|
Hardware: Other → PC
Summary: Comment parsing VERY broken: -> should not terminate comment! → Comments are incorrectly parsed: <!-- -- --> inside comment! <!-- -- -->
Whiteboard: Less Serious Summary: Comments are incorrectly parsed: <!-- -- --> inside comment! <!-- -- -->
Reporter | ||
Updated•26 years ago
|
Whiteboard: Verification is awaiting strict DTD parsing mode.
Reporter | ||
Comment 10•26 years ago
|
||
Query: Is "->" supposed to end comments in NavQuirks mode?
Updated•26 years ago
|
Whiteboard: Verification is awaiting strict DTD parsing mode. → 6/18 Verification is awaiting strict DTD parsing mode.
Updated•26 years ago
|
Whiteboard: 6/18 Verification is awaiting strict DTD parsing mode. → 7/9 Reporter awaiting developer response.
Comment 11•26 years ago
|
||
Reporter awaiting developer response.
Comment 12•26 years ago
|
||
We run in quirks mode by default -- and so yes, -> can close a comment. In
non-quirks mode you will have to use correctly formed comments.
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Comment 13•26 years ago
|
||
verified
1999-07-09-08-M8
Reporter | ||
Updated•26 years ago
|
Status: VERIFIED → REOPENED
Depends on: 1312
Whiteboard: 7/9 Reporter awaiting developer response. → waiting for non-quirks parsing mode
Reporter | ||
Comment 14•26 years ago
|
||
janc: Strict mode parsing is not yet enabled. This bug cannot be verified until
it is. I am adding a dependency to indicate this and removing the verified
notation on this bug for now.
In any case, how exactly did you verify that the bug was fixed? Viewer still
fails two out of three of the tests on the test page for this bug. (It fails
them because it parses in quirk mode.)
Reporter | ||
Updated•26 years ago
|
Status: REOPENED → RESOLVED
Closed: 26 years ago → 26 years ago
Updated•26 years ago
|
Status: RESOLVED → REOPENED
Comment 15•26 years ago
|
||
This was verified per the developer.
Clearing "Resolved Fixed" and re-opening bug.
Comment 16•26 years ago
|
||
Clearing Fixed resolution due to reopen.
Comment 17•26 years ago
|
||
Moving from M3 to M9 milestone since reopen. rickg, please set to later
milestone if more appropriate.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago → 26 years ago
Resolution: --- → REMIND
Comment 18•26 years ago
|
||
I'll move this to REMIND, since we're working per Nav.
Updated•26 years ago
|
Whiteboard: waiting for non-quirks parsing mode → [19990901] Resolution: remind
Reporter | ||
Updated•25 years ago
|
Status: RESOLVED → REOPENED
Whiteboard: [19990901] Resolution: remind → [19990901]
Reporter | ||
Updated•25 years ago
|
Resolution: REMIND → ---
Reporter | ||
Comment 19•25 years ago
|
||
Ok, DOCTYPE-linked standard mode is now hooked up. We still fail these tests,
even though the test page's DOCTYPE should trigger standard mode.
Reopening.
Comment 20•25 years ago
|
||
*** Bug 12025 has been marked as a duplicate of this bug. ***
Status: NEW → RESOLVED
Closed: 26 years ago → 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 21•25 years ago
|
||
Strict comment handling has been hooked up to the noquirks.
Updated•25 years ago
|
Status: RESOLVED → REOPENED
Comment 22•25 years ago
|
||
Even if quirks mode, "->" should not terminate comments
because "->" do not end comments both on Nav4 and on IE.
reopen.
Comment 23•25 years ago
|
||
Comment 24•25 years ago
|
||
Clearing FIXED resolution due to reopen.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 25•25 years ago
|
||
Checked in a fix..
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 26•25 years ago
|
||
Verified fixed.
Updated•25 years ago
|
Status: VERIFIED → REOPENED
Comment 27•25 years ago
|
||
Oops. I found standards mode comment handling is still incorrect.
Reopening.
Comment 28•25 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 29•25 years ago
|
||
Good catch.
Tweaked strict comment handling. Marking FIXED.
Updated•25 years ago
|
Status: RESOLVED → REOPENED
Comment 30•25 years ago
|
||
Still incorrect using 1999102908 build. Reopening.
Comment 31•25 years ago
|
||
Comment 32•25 years ago
|
||
Assignee | ||
Comment 33•25 years ago
|
||
The fix is already in.. which build did you check?
Assignee | ||
Comment 34•25 years ago
|
||
Oops, I'm sorry...I see what you're saying. When I tweaked the strict comment
I, some how, forgot to comment out the line that you'd proposed...my bad :(
Will checkin the change Monday. Thanx for catching it.
Comment 35•25 years ago
|
||
Clearing FIXED resolution due to reopen of this bug.
Reporter | ||
Comment 36•25 years ago
|
||
Note. The eviltest has been updated to contain all permutations mentioned
herein. Thanks to VYV03354@nifty.ne.jp for spotting them. :-)
http://www.bath.ac.uk/%7Epy8ieh/internet/eviltests/comments-evil.html
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 37•25 years ago
|
||
Marking FIXED.
Reporter | ||
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 38•25 years ago
|
||
All tests on the evil test (a superset of the attachements) pass correctly.
Marking verified.
Reporter | ||
Comment 39•24 years ago
|
||
Reopening.
http://www.bath.ac.uk/%7Epy8ieh/internet/eviltests/comments-evil.html fails again.
Blocks: html4.01
Status: VERIFIED → REOPENED
Keywords: regression
QA Contact: janc → ian
Resolution: FIXED → ---
Updated•24 years ago
|
Keywords: mozilla0.9
Target Milestone: M12 → ---
Comment 40•24 years ago
|
||
Ian, would you try to identify the time frame in which the regression was
reintroduced? If it appeared recently it might be much easier to find and fix.
How critical is this? It says 'major' severity, it that accurate?
Reporter | ||
Comment 41•24 years ago
|
||
I would bet that this regressed when we turned off the Strict HTML parser.
->normal; this isn't major any more.
Severity: major → normal
Assignee | ||
Comment 42•24 years ago
|
||
Ian, you're right. It did regress when the strict DTD got turned off. It's still
possible to turn on strict comment parsing but I'm not sure if it's worth doing
so because we now display exactly the way Nav4.x and IE do. Ian, what is your
take on this?
Status: REOPENED → ASSIGNED
Reporter | ||
Comment 43•24 years ago
|
||
If it is easy to turn on in standards mode, then we should. How easy is it?
I would say it's worth fixing, but not necessarily for mozilla0.9. If it is not
an easy fix, then I propose targetting mozilla1.0.
Keywords: mozilla1.0
Assignee | ||
Comment 44•24 years ago
|
||
Reporter | ||
Comment 45•24 years ago
|
||
Yes, we would evangelise. This is just like we do with all the other "bugs" that
pages that trigger standard mode uncover, such as the inline box model issues.
Thankfully, very few broken pages trigger standard mode.
If it's a one line fix, I would recommend we do it for 0.9.
Keywords: mozilla1.0 → testcase
Comment 46•24 years ago
|
||
I agree with Ian, if you can get this one in that would be a good thing. I was
working with another bug and found this to happen:
original reduced test:
<html>
<head>
<title>test</title>
<META NAME=GENERATOR CONTENT="Microsoft FrontPage 4.0">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
commented it out, but placed the close comment as a single dash:
<html>
<head>
<title>test</title>
<!--
<META NAME=GENERATOR CONTENT="Microsoft FrontPage 4.0">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
->
</head>
and when I dumped the html, this is what the content was:
<head>
<title>test</title>
<!--
<META NAME=GENERATOR CONTENT="Microsoft FrontPage 4.0">-->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
->
Note the closing comment is placed after the first meta element -- why is that?
In addition, note that the -> is escaped and within the body
Not sure if the resolution of this bug will resolve that -- Ian, is this similar
to issues that you encountered?
Should this be a new bug? If so, I will gladly open one up
Reporter | ||
Comment 47•24 years ago
|
||
beppe: I'm not sure that's a bug, but file it or mail me directly so that we can
take the discussion out of this bug. (per HTML/SGML/XML, "->" is not a comment
delimiter, so it shouldn't close the comment, IMHO; hence why I say this is
correct. I dunno, I might be wrong.)
Assignee | ||
Comment 48•24 years ago
|
||
Enabled strict comment parsing. Marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 24 years ago
Resolution: --- → FIXED
Comment 50•15 years ago
|
||
I still get it with version 3.5 for Mac see http://alix.guillard.fr/index2.php
Comment 51•15 years ago
|
||
(In reply to comment #50)
> I still get it with version 3.5 for Mac see http://alix.guillard.fr/index2.php
You're actually complaining about the opposite, i.e., bug 214476. (This bug fixed us to behave as SGML specifies, or something like that, but that breaks your page. Bug 214476 is a request to undo that, which we will when we switch to our HTML5 parser.)
It's an interesting case, since it involves commenting out IDN in the xn-- form, though.
You need to log in
before you can comment on or make changes to this bug.
Description
•