[Webkit-unassigned] [Bug 239597] New: [SOUP] Fails to open local HTML file if it's not strict XML

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 21 03:25:40 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=239597

            Bug ID: 239597
           Summary: [SOUP] Fails to open local HTML file if it's not
                    strict XML
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKitGTK
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: berto at igalia.com
                CC: bugs-noreply at webkitgtk.org

(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)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220421/f2ac8102/attachment.htm>


More information about the webkit-unassigned mailing list