<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>239597</bug_id>
          
          <creation_ts>2022-04-21 03:25:40 -0700</creation_ts>
          <short_desc>[SOUP] Fails to open local HTML file when it looks too much like an XHTML file</short_desc>
          <delta_ts>2023-05-03 07:07:17 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>232471</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=230797</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=222867</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=160347</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alberto Garcia">berto</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>berto</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>clord</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1863254</commentid>
    <comment_count>0</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2022-04-21 03:25:40 -0700</bug_when>
    <thetext>(this was originally reported in bug 230797)

1. Create a file called /tmp/hello.html with the following contents:

   &lt;!DOCTYPE html&gt;
   &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;&quot;&gt;
   &lt;head&gt;&lt;meta content=&quot;text/html; charset=utf-8&quot; http-equiv=&quot;Content-Type&quot;&gt;&lt;/head&gt;
   &lt;body&gt;Hello, world&lt;/body&gt;
   &lt;/html&gt;

2. Try to open it with MiniBrowser (I&apos;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 &lt;meta&gt; tag is not closed):

   &quot;This page contains the following errors:

   error on line 3 at column 81: Opening and ending tag mismatch: meta line 3 and head&quot;

4. Now edit the &lt;html&gt; tag and change the order of the attributes:

   &lt;html style=&quot;&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;

   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 &quot;broken&quot; file just file if it&apos;s served over HTTP (likely because of the &quot;Content-type: text/html&quot; header returned by the server)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1863272</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-04-21 06:22:32 -0700</bug_when>
    <thetext>More relevant discussion: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/98</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1952624</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-05-03 07:07:17 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 232471 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>