Closed Bug 329062 Opened 18 years ago Closed 13 years ago

"View Source" strips dashes (--) from malformed comments (minuses, broken, incorrect, missing, illegal) (was: "View Source" window "eats" characters while displaying the source)

Categories

(Toolkit :: View Source, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: grzech, Unassigned)

Details

(Whiteboard: [fixed by the html5 parser])

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

when the html source code contain "<!--><![endif]-->" comment or simply <![endif]--> the last 2'-' are not displayed in the view source window

Reproducible: Always

Steps to Reproduce:
1. Open any html document containg "<!--><![endif]-->" or "<![endif]-->"
2. Choose View->Page Source (or press Ctr+U)
3. Observe the lack of two last '-' characters

Actual Results:  
<!--><![endif]>

Expected Results:  
<!--><![endif]-->
Confirmed with
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a6pre) Gecko/20070618 Minefield/3.0a6pre
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.5pre) Gecko/20070618 BonEcho/2.0.0.5pre
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
OS: Windows XP → All
Whiteboard: DUPEME?
Version: unspecified → Trunk
Confirmed with
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a6pre) Gecko/2007061804 Minefield/3.0a6pre
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.4) Gecko/2007051502 Firefox/2.0.0.4
Couldn't find a duplicate, but it probably exists. Else this bug is likely to block some large meta bug. Confirming anyway.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: "View Source" window "eats" characters while displaying the source → "View Source" strips dashes (--) from malformed comments (minuses, broken, incorrect, missing, illegal) (was: "View Source" window "eats" characters while displaying the source)
Product: Firefox → Toolkit
Interesting, this bug doesn't seem to persist anymore for xhtml pages, and the source code seem to be displayed correctly for those, but for html transitional the bug is still there.

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5
No, sorry - this bug will be only revealed now if there is no DOCTYPE or invalid DOCTYPE is specified.
Fixed by bug 482921.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: DUPEME? → [fixed by the html5 parser]
You need to log in before you can comment on or make changes to this bug.