Closed Bug 89556 Opened 23 years ago Closed 23 years ago

unicafe.fi - HTML comment hiding content

Categories

(Tech Evangelism Graveyard :: Other, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: mjrauhal, Assigned: tristan)

References

()

Details

Attachments

(2 files)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.4.2 i686; en-US; rv:0.9.1) Gecko/20010620
BuildID:    0.9.1

The page has a HTML comment which causes the rest of the table cell
to be apparently empty (only with the end of a comment visible as
"-->")


Reproducible: Always
Steps to Reproduce:
1.Open the mentioned page
2.Marvel at the content not shown


Actual Results:  The page loaded, with no content in the horizontally center table
cell, except for "-->". Page source shows the content being there.

Expected Results:  Show the content in the center cell.

The comment which causes the trouble seems to be the following one:
                <!----------sis&auml;lt&ouml;------------->^M

Context also plays a part in this, since the very same comment
in a rather similiar page, http://www.unicafe.fi/ravintolat.html,
does not cause the same thing to happen. Also, apparently eg.
removing one dash from the comment causes the hidden content
to become visible.

The visible "-->" part could probably more likely be the lonely end
of a later comment than the end of the aforementioned comment.
I have reduced the html to the following html testcase:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Final//EN">
<HTML>
<BODY>
 <!----------valikko------------->
 <!---
  <A HREF="unicafemeille.html"></A>
 ---->
 <!----------sis&auml;lt&ouml;------------->
 <!-- <IMG SRC="kuvat/anim_nelio3.gif"> --> 
</BODY>
</HTML>
Attached file testcase
I also see this in Build 2001070504 in WinNT.
Confirming and changing OS to ALL.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
If you change the doctype to Transitional you'll see that the comments work.
Is there something wrong with the html then?
HTML Element is a deprecated category.  This bug, if it is a bug, is in the parser.
HTML comments are a mess.  Especially comments containing long strings of ------
the 4.01 spec says "Authors should avoid putting two or more adjacent hyphens
inside comments."  It seems almost impossible to satisfy all of the people all
of the time.
Assignee: clayton → harishd
Component: HTML Element → Parser
The parser uses different algorithms for handling comments depending on which 
parser mode it's in: (quirks mode and standards, + strict for Composer).  It 
looks like the relevant code is somewhere around 
<http://lxr.mozilla.org/seamonkey/source/htmlparser/src/nsHTMLTokens.cpp#618> 
and 
<http://lxr.mozilla.org/seamonkey/source/htmlparser/src/nsHTMLTokens.cpp#1008>; 
I'd have to look at the SGML Handbook to determine the legitimacy of the 
testcase.
See the comments in bug 79139 for an explanation of why this should be an
evangelism bug.
I belatedly came to the same conclusion after perusing the SGML handbook.  
Trimming the last three hyphens from the comment should "work" from an HTML 
perspective, although it would be cleaner to follow the advice of the W3C and 
use "=" instead of "-" when you need to stretch a comment out.
Need Evang.
Assignee: harishd → bclary
Component: Parser → Evangelism
QA Contact: bsharma → zach
-> intl team
Assignee: bclary → nitot
QA Contact: zach → momoi
Component: Evangelism → European
Product: Browser → Tech Evangelism
Version: other → unspecified
Moving to new component "West Europe".  European component is being removed. 
See bug 95808 for details.
Component: European → West Europe
QA Contact: momoi → caillon
Summary: HTML comment hiding content → unicafe.fi - HTML comment hiding content
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
fixed (exactly like 4.x)
Page looks good.  Verified linux. 2001111006.
Status: RESOLVED → VERIFIED
resolved euro west non-.com url bugs to other
Component: Europe: West → Other
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: