Space between '--' and '>' breaks comments

RESOLVED WONTFIX

Status

()

Core
HTML: Parser
P3
minor
RESOLVED WONTFIX
18 years ago
16 years ago

People

(Reporter: Hallvard B Furuseth, Assigned: Andreas M. "Clarence" Schneider)

Tracking

({qawanted, testcase})

Trunk
qawanted, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: recc WONTFIX, URL)

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; SunOS 5.7 sun4u; en-US; m18) Gecko/20000911
BuildID:    2000091109

'-- >' does not terminate a comment, unless there is space before
the comment start as well or this is the last comment in the file.

Reproducible: Always
Steps to Reproduce:
1. Try the URL above.


Actual Results:    "a,d"

Expected Results:  "a,c,d"

Comment 1

18 years ago
I'm suspecting this is bugward compatibility...

Let me run some tests.

Comment 2

18 years ago
http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.4

  ``White space is not permitted between the markup declaration open
    delimiter("<!") and the comment open delimiter ("--"), but is
    permitted between the comment close delimiter ("--") and the markup
    declaration close delimiter (">").''

However, I suspect lots of people thought it was nice to make comments like:

<!-- bla bla bla
  -- look at the neat comment
  -- isn't this nice?
  -->

Or perhaps: <!-- keyword -- description -->

So, to not break those pages, Mozilla is kinda forced to do what it currently
does: ignore anything but -->. However, I understand that this has been "fixed"
in xml, of which xhtml is part.

rickg: wontfix?
(Reporter)

Comment 3

18 years ago
Ugh.  Well, maybe you could check for '--[ \t\r\n\f]*>' instead of '-->'.
That would support both your example and this:
<!-- bla bla bla              --
  -- look at the neat comment --
  -- isn't this nice?         --
 >
ns4.5 displays a,d (not surprisingly)
I'd mark it severity: minor, and future it.  It is an fairly easy fix, via the
proposed method, but it's hardly important.  IMHO
This is probably a compatability mode only thing. I'm pretty sure we do the
right thing in strict mode. Could someone (jag?) check? Since you've already
got the test cases made.......

Comment 6

17 years ago
can we make a decission (wontfix or willfix) by mozilla1.0? thanks. marking 
all/all
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: mozilla1.0, testcase
OS: Solaris → All
Hardware: Sun → All
Keywords: qawanted
Whiteboard: need to determine if this is quirks-mode only or also in standard mode; recc WONTFIX if its the former

Comment 7

17 years ago
*** Bug 65049 has been marked as a duplicate of this bug. ***

Comment 8

17 years ago
updated qa contact.
QA Contact: janc → bsharma
(Assignee)

Comment 9

17 years ago
This is quirks mode only, but view-source has wrong syntax highlighting in
standards mode. I'll file a separate bug for that.
Whiteboard: need to determine if this is quirks-mode only or also in standard mode; recc WONTFIX if its the former → recc WONTFIX
(Assignee)

Comment 10

17 years ago
Created attachment 42511 [details]
testcase (strict mode)
Clarence, it looks like your patch in bug 57724 fixes this.  I'm sending this to
you so it doesn't rot in rickg's list...
Assignee: rickg → c
(Assignee)

Comment 12

17 years ago
No, it will only fix the view-source part. Behavior for "-- >" will stay as it
is now: closes a comment in standards mode, but doesn't close it in quirks mode.

WONTFIX is recommended for almost a year now and nobody has contradicted.
=> resolving WONTFIX.
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → WONTFIX

Updated

16 years ago
QA Contact: bsharma → moied
You need to log in before you can comment on or make changes to this bug.