Closed Bug 160507 Opened 23 years ago Closed 23 years ago

Two dashes inside <!-- --> (comment) doesn't work well

Categories

(Tech Evangelism Graveyard :: English US, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bjorn, Assigned: doronr)

References

()

Details

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>
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?
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.
Assignee: attinasi → doron
Component: Layout → US General
Product: Browser → Tech Evangelism
QA Contact: petersen → zach
Version: other → unspecified
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...
The reported page has been fixed.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.