Closed Bug 275192 Opened 20 years ago Closed 20 years ago

Firefox misunderstands '>' character in XML processing instructions in local files

Categories

(Firefox :: General, defect)

1.0 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: n-roeser, Assigned: bugzilla)

Details

Please see bug 258868 first.

The same bug appears when trying to read a local file; it does not appear (as
described in above mentioned bug) when using a document from a web server.

Firefox should see that the local file contains XML and handle it as if it was
served with application/xhtml+xml. Currently, it behaves as if the file
contained text/html. The XML declaration should be sufficient to find out that
the file does not contain text/html, but application/xhtml+xml.


-----BEGIN testcase-----
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?php
header('Link: <styles>; rel="stylesheet"; type="text/css"; charset="UTF-8"', false);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" version="-//W3C//DTD XHTML 1.1//EN"
xml:lang="en" dir="ltr">
<head>
<title>Test document</title>
</head>
<body>

<!-- ... -->

</body>
</html>
-----END testcase-----

The problem is caused by the wrong handling of the '>' character in the Link
header (line 3) in this example.
Local files are determined to be HTML or XHTML solely by the file suffix, not
the content.  .html for HTML files, .xhtml for XHTML ones.

See http://www.mozilla.org/newlayout/xml/#xhtml
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.