Old HTML files are not properly displayed, although the W3C Validator says that they are valid

RESOLVED INVALID

Status

()

Core
HTML: Parser
RESOLVED INVALID
5 years ago
5 years ago

People

(Reporter: marius.spix, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0 SeaMonkey/2.16.2
Build ID: 20130406224520

Steps to reproduce:

I wanted to read manual of an old computer game. It contained unusual SGML syntax.

Try this test document, it is successfully validated as HTML 4.01 Strict by the W3C Markup Validation Service (http://validator.w3.org/check):

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<title/Title/
<p/Paragraph 1/
<p>Paragraph 2</p>
<p>Paragraph 3</>
<p>Paragraph 4

All four paragraphs have a valid syntax.


Actual results:

Nothing is displayed at all. So I have to read the document in a text editor.


Expected results:

The above mentioned document should look like its equivalent:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Title</title>
</head>
<body>
<p>Paragraph 1</p>
<p>Paragraph 2</p>
<p>Paragraph 3</p>
<p>Paragraph 4</p>
</body>
(Reporter)

Updated

5 years ago
Severity: normal → critical
Component: Untriaged → File Handling

Comment 1

5 years ago
Henri, do you know what's supposed to happen here?
(Reporter)

Comment 2

5 years ago
Especially the following shorttags are affected:
(All examples are valid HTML!)

--------------------------------------------------
NET tags (null-end tags):
--------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<title/Lorem ipsum/
<p/Lorem <b/ipsum/ dolor sit amet./


--------------------------------------------------
Empty start tags:
--------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<title>...</title>
<ol>
	<li>first
	<>second
	<>third
	</li>
</ol>

----------------------------------------------------
Empty End Tags:
----------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<title>...</title>
<table>
	<tr>
		<th></>
		<th>North</>
		<th>South</>
	</>
	<tr>
		<td></>
		<td>40</>
		<td>30</>
	</>
</table>

--------------------------------------------------
Unclosed tags (deprecated!)
--------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<title>...</title>
<p<b>Lorem Ipsum</b</p<p>dolor sit.</p>

Updated

5 years ago
Severity: critical → normal

Comment 3

5 years ago
Created attachment 740039 [details]
Reporter's testcase

Updated

5 years ago
Attachment #740039 - Attachment mime type: text/plain → text/html
I can't see anything displayed with the attached testcase, with: the latest Nightly (build ID: 20130421031002), Firefox 4.0 and Chromium, on an Ubuntu 12.10 32-bit machine.
Resolving INVALID in the sense that this is not a bug according to the specifications we implement. We don't implement the HTML 4 specs. The HTML 4 specs are fictional and unimplementable. That is, if we implemented the parsing rules that the files you cite require, we fail to render the Web. It's unfortunate that the legacy validator at the W3C implements Web-incompatible parsing. If you want to use a W3C-hosted validator, I suggest using http://validator.w3.org/nu/
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Component: File Handling → HTML: Parser
Product: Firefox → Core
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.