Closed Bug 44819 Opened 24 years ago Closed 24 years ago

Local XHTML file with extension .html treated as HTML file

Categories

(Core :: DOM: HTML Parser, defect, P3)

x86
Windows 95
defect

Tracking

()

VERIFIED DUPLICATE of bug 26022

People

(Reporter: rbs, Assigned: harishd)

Details

DESCRIPTION:
============
With a tree pulled yesterday, a *local* XHTML document with the strict DOCTYPE
is treated as HTML when the name of the file has the extension .html. When the
same file is renamed with the extension .xml, it is treated as XHTML.

STEP TO REPRODUCE:
==================
1. Save the following in two local files named temp.xml, and temp.html

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC
 "-//W3C//DTD XHTML 1.0 Strict//EN"
 "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">  
  <head>  
    <title>XHTML Document with entities</title>  
  </head>  
  <body>  
    <p>
      alpha:  &alpha;  <br />
      beta:   &beta;   <br />
      eacute: &eacute; <br />
      egrave: &egrave; <br />
      ucirc:  &ucirc;  <br />
      agrave: &agrave;
    </p>  
  </body>  
</html>

2. Load temp.html, observe that the browser has properly resolved the entities

3. Load temp.xml, observe that the browser hasn't properly resolved the entities

ACTUAL RESULTS:
===============
The browser has properly resolved the entities in the .html file, this
shows that the local file was treated as HTML.

EXPECTED RESULTS:
=================
The browser should display the same content with either extension. Indeed, if
tmp.html and temp.xml were treated in the same way, the browser shouldn't have
resolved the entities because bug 44458 is not yet fixed. Bug 44458 says that
HTML entities are not yet recognized in XHTML documents

ADDITIONAL NOTES:
=================
The steps to reproduce given above will become irrelevant when bug 44458 is
fixed. I haven't tested with the extension .xhtml.
reassigning
Assignee: rickg → harishd
Status: NEW → ASSIGNED
Keywords: nsbeta3
Parser is been given text/html mime type for XHTML documents with .html 
extension.  

*** This bug has been marked as a duplicate of 26022 ***
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.