Closed
Bug 249913
Opened 21 years ago
Closed 21 years ago
Code treated as comment when the text contains hyphens - Page doesn't display correctly
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: mail, Assigned: bugzilla)
Details
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Build Identifier: 0.9.1
I have a website that had a comment at the beginning of my server side include
that looked like this:
<!-- ---------- BEGIN SERVER SIDE INCLUDE ---------------- -->
The browser treated everything as comments from this point until it reached
the following comment:
<!-- ---------- END SERVER SIDE INCLUDE ------------------ -->
There were other comments between these two comments such as:
<!-- Begin Navigation Table 1 Rows 1 Columns -->
These comments did not cause the recognition of the end of the comment block.
When I changed the initial and end comment lines to the following, the code
was no longer treated as a comment:
<!-- *********** BEGIN SERVER SIDE INCLUDE *********************** -->
<!-- *********** END SERVER SIDE INCLUDE ************************* -->
The comments with the hyphens work in Internet Explorer but not Firefox or
Mozilla. They only would work by changing the hyphens to asterisks
Reproducible: Always
Steps to Reproduce:
1. Add comment lines around a block of HTML with embedded hyphens as part of
the text as I illustrated in the Details section.
2. Display the page in a browser.
3. Look at the result in the DOM Inspector
Actual Results:
The code between the comments is treated as one large comment block when it
shouldn't be.
Expected Results:
It should have recognized the end of comment marker --> at the end of the line
and displayed the page with the HTML not treated as a comment.
Comment 1•21 years ago
|
||
This is correct behavior. -- marks the beginning/end of a comment and so is not
permitted within the comment.
See http://www.w3.org/TR/html401/intro/sgmltut.html#idx-HTML
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 2•21 years ago
|
||
(In reply to comment #1)
> This is correct behavior. -- marks the beginning/end of a comment and so is
not
> permitted within the comment.
> See http://www.w3.org/TR/html401/intro/sgmltut.html#idx-HTML
Thanks! I was using a bad practice based upon Internet Explorer accepting
this as valid.
You need to log in
before you can comment on or make changes to this bug.
Description
•