Bug 278111 - Firefox renders HTML comments wrong
Firefox renders HTML comments wrong
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: firefox (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Gecko Maintainer
Depends On:
  Show dependency treegraph
Reported: 2007-09-05 05:20 EDT by Klaus Ethgen
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-10-04 09:42:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Klaus Ethgen 2007-09-05 05:20:17 EDT
This problem seems to be a upstream problem.

If there are ,,--'' inside of a HTML comment of a web page the rendering engine 
gets completely wrong. There are not always the same visible effects but mostly 
rendering failures.

See the example HTML page and compare the output of firefox with other graphical
browsers or with the expected result.

--- SNIP ---
<!-- ---++%SPACEOUT{"Fail"}% -->
--- SNAP ---
Comment 1 Klaus Ethgen 2007-09-05 05:32:48 EDT
I made a mistake in the code. Use this to reproduce the bug:
--- SNIP ---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
      <!-- ---++%SPACEOUT{"Fail"}% -->
--- SNAP ---
Comment 2 Christopher Aillon 2007-10-04 09:42:01 EDT
See https://bugzilla.mozilla.org/show_bug.cgi?id=214476 for a detailed explanation.

Firefox is actually correct here.  The comment delimiter is actually -- per
SGML.  Your markup has three double-dash sequences:

<!-- ---++%SPACEOUT{"Fail"}% -->
  -- --                      --
    ^  ^^^^^^^^^^^^^^^^^^^^^^

The first -- opens the comment, and there is a space commented out.  But then
you close it out with the next two dashes, so the rest is displayed.  Finally,
you close the comment again with the last two dashes and anything you would add
after that would be commented.

Bottom line is, Firefox is following the spec.  If the HTML is intended to be
commented, then it is wrong.  :-)

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