WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 232471
239597
[SOUP] Fails to open local HTML file when it looks too much like an XHTML file
https://bugs.webkit.org/show_bug.cgi?id=239597
Summary
[SOUP] Fails to open local HTML file when it looks too much like an XHTML file
Alberto Garcia
Reported
2022-04-21 03:25:40 PDT
(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
Comment 1
2022-04-21 06:22:32 PDT
More relevant discussion:
https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/98
Michael Catanzaro
Comment 2
2023-05-03 07:07:17 PDT
*** This bug has been marked as a duplicate of
bug 232471
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug