Closed Bug 277273 Opened 20 years ago Closed 20 years ago

Problem with html comments

Categories

(Core :: DOM: HTML Parser, defect)

1.7 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: securifirm, Unassigned)

References

()

Details

Attachments

(1 file)

According to the url, HTML comments can be as follows:

"A comment declaration starts with <!, followed by zero or more comments,
followed by >. A comment starts and ends with "--", and does not contain any
occurrence of "--"."

   1. <!-- Hello -->
   2. <!-- Hello -- -- Hello-->
   3. <!---->
   4. <!------ Hello -->
   5. <!> 

Looking at testcase 4, if you remove the space <!------Hello -->, the comment no
longer works as well as the testcase <!------ Hello -- >.  Both of these should
work but do not.
All of those including your alterations wfm, 1.0 and trunk. Can you attach a
testcase that shows your nonworking comment situation?
Assignee: firefox → parser
Component: General → HTML: Parser
Product: Firefox → Core
QA Contact: firefox.general → mrbkap
Version: 1.0 Branch → 1.7 Branch
Attached file Example of comments
Comment on attachment 170469 [details]
Example of comments

It looks like the following:

<!-------- This is a test -->
How can case 2 and 4 be valid? There are occurrences of "--" between "<!--" and
"-->".
I don't know about test case 2, but i'm assuming that with test case 4, the
reason it's valid is because there is no spacing in the dashes.

I'm seeing a lot of sites use comments like this and i think that it would help
the overall rendering of webpages if these were included.
        <![----][----] This is a test -->

I marked pairs of -- -- (start/end pairs) with []. as you can see, there is a
mismatch here - the final -- has no matching --. thus, this document is invalid.
html does not define error handling. this bug is invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
(note that in quirks mode, which the testcase attached here does not use,
comments are interpreted to start with <!-- and end with -->).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: