Closed Bug 294119 Opened 20 years ago Closed 20 years ago

HTML comment start (<!--) within a comment (<!-- ... -->) displays '-->', reformats page

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 229974

People

(Reporter: hillel, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

I code web pages.  As the client requires changes, I often leave old code in my
page with HTML comment codes around it for possible future reinstatement.  If 2
commented sections abutt, the code might look like:

          <!--        <tr>
                  	<td>&nbsp;</td>
             <!--     	<td><b><font color="red"><div id="pay1">
</div></font></b></td>	-->

I just downloaded FireFox today, and on my home page, I saw '-->' displayed and
the following text column was displaced 1 column to the right.

Removing the embedded '<!--' fixed the problem.

Internet Explorer 6.0 does not have a problem with this code.  And I have not
heard any other comments that this code causes a problem in another version of
Internet Explorer.

I plan to check all my pages using FireFox and correct any embedded '<!--'s.  I
suppose this could be considered a badly-coded web page, but it does not cause a
problem in Internet Explorer.

Reproducible: Always

Steps to Reproduce:
1. Include any similarly formatted comment in your HTML code.
2.
3.

Actual Results:  
'-->' displays and the formatting of the next section of code is changed.

Expected Results:  
Ignored any embedded '<!--'.
Duplicate. See also bug 102127 for an explanation why this is invalid.

*** This bug has been marked as a duplicate of 229974 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.