html comments are displayed

RESOLVED DUPLICATE of bug 214476

Status

()

Core
HTML: Parser
RESOLVED DUPLICATE of bug 214476
9 years ago
8 years ago

People

(Reporter: jbjorkman, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(5 attachments)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 1.1.4322; InfoPath.2; .NET CLR 3.5.21022; .NET CLR 3.5.30428; .NET CLR 3.5.30729; .NET CLR 4.0.20506; .NET CLR 3.0.30729; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; sv-SE; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3

The ASP.NET page contains the following code:

<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
  <!-- 
  ==================================================================
  System     : ddress.se
  Filnamn    : Default.aspx
  Skapad av  : Jörgen Björkman
  Beskrivning: Startsida för DDress.se
  ==================================================================
  Version Datum      Sign Notering
  ------- ---------- ---- ------------------------------------------
  1.00.00 2009-08-17 JB   Skapad
  1.00.00 2009-08-25 JB   Kompletterat artikellänkar
                          Lagt till bildspel
  1.00.01 2009-09-10 JB   Aspect Ratio på bildspelet är fel, bilderna
                          är för breda. Ändrat colspan från 3 till 2
-->
 <title>Diamond Dresses</title>
</asp:Content>

the html comment is displayed by the parser, it should not be.

Reproducible: Always

Steps to Reproduce:
1. create a webpage that contains html comments.
2. open the webpage in Firefox
3.
Actual Results:  
The following text is displayed:

  <!-- 
  ==================================================================
  System     : ddress.se
  Filnamn    : Default.aspx
  Skapad av  : Jörgen Björkman
  Beskrivning: Startsida för DDress.se
  ==================================================================
  Version Datum      Sign Notering
  ------- ---------- ---- ------------------------------------------
  1.00.00 2009-08-17 JB   Skapad
  1.00.00 2009-08-25 JB   Kompletterat artikellänkar
                          Lagt till bildspel
  1.00.01 2009-09-10 JB   Aspect Ratio på bildspelet är fel, bilderna
                          är för breda. Ändrat colspan från 3 till 2
-->

Expected Results:  
The html comments should not be displayed. The Html parser should filter out html comments.

Compare the page www.ddress.se as it is displayed in Firefox 3.5.3 and Internet Explorer 8.
(Reporter)

Comment 1

9 years ago
Created attachment 400710 [details]
A Printscreen of the page displayed in Firefox 3.5.3

A Printscreen of the webpage as displayed in Firefox 3.5.3
(Reporter)

Comment 2

9 years ago
Created attachment 400712 [details]
A Printscreen of the page displayed in Internet Explorer 8 for comparison

A printscreen of the webpage as displayed in Internet Explorer 8 for comparison.
(Reporter)

Updated

9 years ago
Attachment #400710 - Attachment description: A Printsreen of the page displayed in Firefox 3.5.3 → A Printscreen of the page displayed in Firefox 3.5.3
The HTML5 parser fixes this.
Status: UNCONFIRMED → NEW
Depends on: 373864
Ever confirmed: true
(Reporter)

Comment 4

9 years ago
Created attachment 400716 [details]
A Printscreen of the page displayed in Opera 9.5.1 for comparison
(Reporter)

Comment 5

9 years ago
Created attachment 400717 [details]
A Printscreen of the page displayed in Safari 4.0.3 for comparison
(Reporter)

Comment 6

9 years ago
Created attachment 400718 [details]
A Printscreen of the page displayed in Google Chrome 2.0 for comparison

Comment 7

9 years ago
In HTML 4, this bug is invalid. See <http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.4>. You can not use -- inside a comment, due to the strict SGML rules. Just try a HTML validator, you will see an error.

In HTML 5, this part will be relaxed because so many people make the same mistake (and the SGML rules are a bit silly IMHO), see <http://dev.w3.org/html5/spec/Overview.html#comments>.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 214476

Updated

8 years ago
No longer depends on: 373864
You need to log in before you can comment on or make changes to this bug.