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

Closing tag '/>' for XHTML displayed as an error

RESOLVED DUPLICATE of bug 162653

Status

()

Toolkit
View Source
--
trivial
RESOLVED DUPLICATE of bug 162653
10 years ago
9 years ago

People

(Reporter: Sjors Gielen, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080207 Ubuntu/7.10 (gutsy) Firefox/2.0.0.12
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080207 Ubuntu/7.10 (gutsy) Firefox/2.0.0.12

When opening an XHTML page and viewing the source, for non-container tags like:
<link rel="stylesheet" href="style.css" type="text/css"/>
the last '/' is red, which is normally used to describe errors. This gives the illusion the closing /> is wrong, while it is standard XML syntax.

Reproducible: Always

Steps to Reproduce:
1. Go to an XHTML page such as http://bugs.dazjorz.com/
2. View source
3. Look at a non-container tag like <link/>. See how the last '/' is red.
Actual Results:  
The '/' at the end (in '/>') is red.

Expected Results:  
I expected the '/' at the end to be black, just like the / in </title>, for example, and the > which comes after the / in for example <link/>.

Comment 1

10 years ago
It seems that server is reporting "text/html" so that why you get that "/" is red.
(Reporter)

Comment 2

10 years ago
text/html is a valid mime type for XHTML 1.0; next to that, I have an XHTML doctype, so Firefox knows it's XML... Right?

Comment 3

10 years ago
(In reply to comment #2)
> text/html is a valid mime type for XHTML 1.0; next to that, I have an XHTML
> doctype, so Firefox knows it's XML... Right?
> 

if it is under "text/html", you are using the HTML parser instead XML parser.
(Reporter)

Comment 4

10 years ago
But that's not right, because I have an XHTML doctype, so the file *must* be parsed by an XML parser. Isn't that a bug in Firefox itself, then?

Comment 5

10 years ago
Files are parsed according to their MIME type.  If the file is marked as text/html, then it's parsed as HTML.  Mark it as text/plain and it's not parsed at all.

The DOCTYPE is only examined for text/html, and then only to switch between HTML parsing modes--see http://developer.mozilla.org/en/docs/Mozilla%27s_DOCTYPE_sniffing for the details.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 162653
(Assignee)

Updated

9 years ago
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.