Closed Bug 655661 Opened 9 years ago Closed 6 years ago

appearance of — in HTML causes XML error

Categories

(Web Compatibility :: Desktop, defect)

All
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wolfiR, Unassigned)

References

()

Details

Apparently — causes a fatal XML error.
The page is served as application/xml so it's not an html page. XML has fewer predefined entities than HTML. http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
As an end user, this is annoying. There is no hint what I can do about it. It appears to be a plain firefox bug ("XML Parsing Error: undefined entity"), although the server is at fault. Invalid XML sent.

Is there a way, I can make Firefox display the page with a more forgiving parser, e.g. 'try as html'?

Currently I am forced to use konqueror. It displays the page without any complaints.
1)  I think we should get this server fixed.  Wolfgang, want to contact them?

2)  Juergen, there have been lots of arguments about that over the years. It's a
    hard problem with minimal benefit to the solution and some serious problems
    (e.g. it can facilitate cross-site script injection).

For the rest:

> There is no hint what I can do about it

Get the server fixed.

> It appears to be a plain firefox bug

I'm not sure what we can do about that.  We're telling you the XML is not well-formed, and you think it's a Firefox bug....

> Currently I am forced to use konqueror. It displays the page without any
> complaints.

That's a violation of the XML spec, actually.  You're allowed to display the part of the page up to the error (e.g. WebKit does this; it shows only part of the license), but you must stop at that point and report the problem to the users.
Assignee: nobody → english-us
Status: RESOLVED → REOPENED
Component: HTML: Parser → English US
Product: Core → Tech Evangelism
QA Contact: parser → english-us
Resolution: INVALID → ---
Version: 2.0 Branch → unspecified
Pretending to be an uneducated user, I'd assume a firefox bug, because it says 'XML Parsing Error:' 
With all the helpful input from Wolfgang and Robert, I understand very well what is going on. The issue I have is the way firefox communicates the error to its user. The user is given little hints to find out if the problem is in the server, in the browser, or with both.

Knowing that — is illegal 'here', and knowing that we are in strict XML mode were two surprising artefacts to me.
Fair.  I filed bug 655721.
I see another XML Parsing Error at
http://www.opensourcecartouche.org/dtd/0.1.dtd

Content-Type: text/xml

Maybe a dtd should have a different mime-type?
Is this the same issue?
> Maybe a dtd should have a different mime-type?

Yes.  DTDs are not XML.
Oh, and that's not the same issue.
(In reply to comment #9)
> Oh, and that's not the same issue.
still has the same effect to the end user as in #c5, and bug 655721 can improve both.

It appears that firefox is just too helpless, when confronted with a false mime-type.
> It appears that firefox is just too helpless, when confronted with a false
> mime-type.

Look, we have two options.  We can either follow the server-provided MIME type.  Or we can sniff and do whatever we feel like.  Please do some research on the pain and suffering that IE doing the latter has caused over the years....
This has been fixed.

→ http HEAD http://spdx.org/licenses/OFL-1.1
HTTP/1.1 200 OK
Cache-Control: max-age=7200
Connection: keep-alive
Content-Encoding: gzip
Content-Type: text/html; charset=UTF-8
Date: Mon, 22 Sep 2014 00:08:36 GMT
Expires: Mon, 22 Sep 2014 02:08:36 GMT
Last-Modified: Fri, 08 Aug 2014 06:03:21 GMT
Server: nginx
Vary: Accept-Encoding
Assignee: english-us → nobody
Status: REOPENED → RESOLVED
Closed: 9 years ago6 years ago
Component: English US → Desktop
Resolution: --- → FIXED
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.