Closed Bug 578947 Opened 14 years ago Closed 14 years ago

error occur when recognizing html comment statement

Categories

(Core :: General, defect)

x86_64
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 214476

People

(Reporter: ly20201, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)

original html file is like:
<!-- AD zone start-->
<AD pic>
<!-- AD zone end -->
when I want to delete the ad picture,i delete the two dashes‘-’in first comment statement:
<!-- AD zone start>
<AD pic>
<!-- AD zone end -->
this two statement and the picture should be considered as a comment statement block, but ff shows a sentence<!-- AD zone start> and then the picture.

Reproducible: Always

Steps to Reproduce:
1.write some html file
2.including a comment statement like this:
<!-- AD zone start>
<!-- AD zone end -->

Actual Results:  
a sentence <!-- AD zone start>

Expected Results:  
nothing(because this is a comment statement block begin with the first‘<!--’ and end with ‘-->’)
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Verified.  Note that in HTML4 comments end with -- and start with --, so what you have is an unclosed comment (since you close the comment and then reopen it agai), which is then reparsed with looser comment parsing...

HTML5 changes the spec to align with what you seem to expect to happen.
You need to log in before you can comment on or make changes to this bug.