If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

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

RESOLVED INVALID

Status

()

Firefox
General
RESOLVED INVALID
13 years ago
13 years ago

People

(Reporter: Nico R., Assigned: Blake Ross)

Tracking

1.0 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

13 years ago
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.

Comment 1

13 years ago
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
Last Resolved: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.