Bug 239597
| Summary: | [SOUP] Fails to open local HTML file when it looks too much like an XHTML file | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Alberto Garcia <berto> |
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | berto, bugs-noreply, cgarcia, clord, mcatanzaro |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=230797 https://bugs.webkit.org/show_bug.cgi?id=222867 https://bugs.webkit.org/show_bug.cgi?id=160347 |
||
Alberto Garcia
(this was originally reported in bug 230797)
1. Create a file called /tmp/hello.html with the following contents:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" style="">
<head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></head>
<body>Hello, world</body>
</html>
2. Try to open it with MiniBrowser (I'm using WebKitGTK 2.36.0, glib 2.72.0 and libsoup 2.74.2)
$ /usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/MiniBrowser /tmp/hello.html
3. The following error message appears (because the <meta> tag is not closed):
"This page contains the following errors:
error on line 3 at column 81: Opening and ending tag mismatch: meta line 3 and head"
4. Now edit the <html> tag and change the order of the attributes:
<html style="" xmlns="http://www.w3.org/1999/xhtml">
This one opens just fine.
Some additional notes:
* Removing the style attribute results in the same error shown in point 3.
* WebKit can display the "broken" file just file if it's served over HTTP (likely because of the "Content-type: text/html" header returned by the server)
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Michael Catanzaro
More relevant discussion: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/98
Michael Catanzaro
*** This bug has been marked as a duplicate of bug 232471 ***