Last Comment Bug 160507 - Two dashes inside <!-- --> (comment) doesn't work well
: Two dashes inside <!-- --> (comment) doesn't work well
Status: RESOLVED FIXED
:
Product: Tech Evangelism Graveyard
Classification: Graveyard
Component: English US (show other bugs)
: unspecified
: x86 Windows 2000
: -- normal
: ---
Assigned To: Doron Rosenberg (IBM)
: Zach Lipton [:zach]
:
Mentors:
http://www.erlang.org/cgi-bin/marc-se...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2002-08-01 06:46 PDT by Björn Bylander
Modified: 2015-04-19 23:39 PDT (History)
0 users
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Björn Bylander 2002-08-01 06:46:46 PDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.8+)
Gecko/20020228
BuildID:    2002073019

The code that the URL produces contains two "-" inside a "<!-- -->" comment.
Apparently this confuses Mozilla so much that the ending "-->" is ignored. If I
look at the source of the page a large portion of the code is marked as
commented out (green). The effect on the rendered page is that only
"Return to the Erlang-questions archive
Written by Eric D. Friedman -- friedman@uci.edu
Based on Jason Lin's code -- jlin@uci.edu
Last updated March 29, 1997
Please send comments to eee@uci.edu"
is shown. This works in IE6. I tried this page a long time ago, about 0.9.6 or
so and it didn't work then either. I send an email to eee@uci.edu to notify hir
of this but didn't receive a response.

Reproducible: Always
Steps to Reproduce:
1. Open
"http://www.erlang.org/cgi-bin/marc-search.cgi?ml-archive%2Ferlang-questions" in
the browser.


Actual Results:  Viewing the source I observe that more of the code than what is
probably intended is commented out.
Viewing the page I observe that you can not use the search function.

Expected Results:  The source should have been correctly commented out.
The search function and the rest that is not shown should be visible and usable.

Is "--" not followed by a ">" inside a comment legal HTML?
http://validator.w3.org/ says "No!", would it be unreasonable for Mozilla to
allow "--" if it is not immediately followed by a ">"?

Anyway, the following code shows the problem:
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
<html>
<head>
<!-- --	-->
<title>test</title>
</head>
<body>
not visible
-->
visible
</body>
</html>
Comment 1 Tim Hunt 2002-08-01 07:07:54 PDT
Go to the test page, and do View -> Page Info. You will see that this page is
being rendered in strict mode. This is because the page has a DOCTYPE which is
not on the list of DOCTYPES that trigger quirks mode.
(http://www.mozilla.org/docs/web-developer/quirks/doctypes.html)

Srictly speaking, two dashes "--" inside an HTML comment ends the comment, and
then another two dashes starts another comment. Read up on how HTML is based on
SGML. Since Mozilla is in strict mode, this is what it does.

So, INVALID, I think. The only question is, should this DOCTYPE be added to the
list of ones that triggers quirks mode?
Comment 2 Christopher Aillon (sabbatical, not receiving bugmail) 2002-08-01 08:07:52 PDT
Tech Evangelism.  Can't access the site though.  Is it down?  Bjorn, can you
check and give us a URL which works?

Also see bug 2749 for details as why this is the correct behavior.
Comment 3 Björn Bylander 2002-08-01 08:16:37 PDT
Ok, well
http://www.erlang.org/cgi-bin/marc-search.cgi?ml-archive%2Ferlang-questions
works for me. To get to it start at http://www.erlang.org/ then click "FAQs +
Contact" (http://www.erlang.org/faq.html). Next, click on "online archive"
(http://www.erlang.org/ml-archive/erlang-questions/) and then "seach function"
(http://www.erlang.org/cgi-bin/marc-search.cgi?ml-archive%2Ferlang-questions).

While you're at erlang.org, bookmark it. It's a very nice language. :-D
I'll try to get them to change the search page through the Erlang mailing list...
Comment 4 Björn Bylander 2002-08-01 10:43:09 PDT
The reported page has been fixed.

Note You need to log in before you can comment on or make changes to this bug.