<?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>25466</bug_id>
          
          <creation_ts>2009-04-29 12:42:04 -0700</creation_ts>
          <short_desc>WebKitGtk+ 1.1.6 prints weird error messages in Liferea</short_desc>
          <delta_ts>2009-05-02 12:40:09 -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>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrian Bunk">bunk</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>busg</cc>
    
    <cc>pochu27</cc>
    
    <cc>xan.lopez</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>119314</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Bunk">bunk</who>
    <bug_when>2009-04-29 12:42:04 -0700</bug_when>
    <thetext>I&apos;ll attach examples.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119315</commentid>
    <comment_count>1</comment_count>
      <attachid>29890</attachid>
    <who name="Adrian Bunk">bunk</who>
    <bug_when>2009-04-29 12:43:47 -0700</bug_when>
    <thetext>Created attachment 29890
error on line 81 at column 12: expected &apos;&gt;&apos;

it complains about the &quot;h&quot; in the &lt;/html&gt; tag</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119316</commentid>
    <comment_count>2</comment_count>
      <attachid>29891</attachid>
    <who name="Adrian Bunk">bunk</who>
    <bug_when>2009-04-29 12:45:58 -0700</bug_when>
    <thetext>Created attachment 29891
error on line 58 at column 3: Extra content at the end of the document

the &quot;extra content&quot; is the &lt;/body&gt;&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119317</commentid>
    <comment_count>3</comment_count>
      <attachid>29892</attachid>
    <who name="Adrian Bunk">bunk</who>
    <bug_when>2009-04-29 12:47:20 -0700</bug_when>
    <thetext>Created attachment 29892
error on line 66 at column 38: expected &apos;&gt;&apos;

that&apos;s in the middle of the href of &lt;a href=&quot;liferea-refresh-comments://lxccyfn-227638&quot;&gt;&lt;span&gt;Refresh&lt;/span&gt;&lt;/a&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119325</commentid>
    <comment_count>4</comment_count>
    <who name="Adrian Bunk">bunk</who>
    <bug_when>2009-04-29 13:20:56 -0700</bug_when>
    <thetext>the call to webkit_web_view_load_string() is in https://liferea.svn.sourceforge.net/svnroot/liferea/trunk/liferea/src/webkit/webkit.c

Call to webkit_web_view_load_string():

Breakpoint 1, webkit_web_view_load_string (webView=0x182e0b0, 
    content=0x1a89380 &quot;&lt;?xml version=\&quot;1.0\&quot; encoding=\&quot;utf-8\&quot;?&gt;&lt;!DOCTYPE html PUBLIC \&quot;-//W3C//DTD XHTML 1.0 Transitional//EN\&quot;\n\&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\&quot;&gt;\n&lt;html xmlns=\&quot;http://www.w3.org/1999/xhtm&quot;..., mimeType=0x46237a &quot;application/xhtml+xml&quot;, encoding=0x461614 &quot;UTF-8&quot;, 
    baseUri=0x46109f &quot;file://&quot;) at WebKit/gtk/webkit/webkitwebview.cpp:2483
2483    {
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119328</commentid>
    <comment_count>5</comment_count>
    <who name="Adrian Bunk">bunk</who>
    <bug_when>2009-04-29 13:29:17 -0700</bug_when>
    <thetext>For one optically visible problem (the last of my 3 examples) I have confirmed that the problem is not present with 1.1.5.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119654</commentid>
    <comment_count>6</comment_count>
    <who name="Gustavo Noronha (kov)">gustavo</who>
    <bug_when>2009-05-01 20:40:50 -0700</bug_when>
    <thetext>I found the problem, apparently. The problem is that the error code patch refactored the loading of string into a shared function, which mistakenly calls g_utf8_strlen on the string that is to be loaded, so any string with !ascii UTF-8 characters will have some content stripped from the end when creating the SharedBuffer:

    RefPtr&lt;SharedBuffer&gt; sharedBuffer = SharedBuffer::create(content, g_utf8_strlen(content, -1));

I&apos;m cooking a patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119668</commentid>
    <comment_count>7</comment_count>
      <attachid>29956</attachid>
    <who name="Gustavo Noronha (kov)">gustavo</who>
    <bug_when>2009-05-02 05:44:30 -0700</bug_when>
    <thetext>Created attachment 29956
Calculate the size of the string correctly

 WebKit/gtk/ChangeLog                 |   13 +++++++++++++
 WebKit/gtk/webkit/webkitwebframe.cpp |    2 +-
 2 files changed, 14 insertions(+), 1 deletions(-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119687</commentid>
    <comment_count>8</comment_count>
      <attachid>29956</attachid>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-05-02 12:31:47 -0700</bug_when>
    <thetext>Comment on attachment 29956
Calculate the size of the string correctly


&gt; -    RefPtr&lt;SharedBuffer&gt; sharedBuffer = SharedBuffer::create(content, g_utf8_strlen(content, -1));
&gt; +    RefPtr&lt;SharedBuffer&gt; sharedBuffer = SharedBuffer::create(content, strlen(content));


Yes it makes sense, maybe you also want to add a unit test and compare the html with the one we set?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119688</commentid>
    <comment_count>9</comment_count>
    <who name="Gustavo Noronha (kov)">gustavo</who>
    <bug_when>2009-05-02 12:36:55 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; (From update of attachment 29956 [review])
&gt; 
&gt; &gt; -    RefPtr&lt;SharedBuffer&gt; sharedBuffer = SharedBuffer::create(content, g_utf8_strlen(content, -1));
&gt; &gt; +    RefPtr&lt;SharedBuffer&gt; sharedBuffer = SharedBuffer::create(content, strlen(content));
&gt; 
&gt; 
&gt; Yes it makes sense, maybe you also want to add a unit test and compare the html
&gt; with the one we set?

We have no proper way of getting the source code backing a frame, &apos;till Jan&apos;s DataSource patch is landed. I will add a test when we land that =).
&gt; 

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119689</commentid>
    <comment_count>10</comment_count>
    <who name="Gustavo Noronha (kov)">gustavo</who>
    <bug_when>2009-05-02 12:40:09 -0700</bug_when>
    <thetext>Landed as r43146. I&apos;ll open a bug report to remind me of the unit test.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>29890</attachid>
            <date>2009-04-29 12:43:47 -0700</date>
            <delta_ts>2009-04-29 12:43:47 -0700</delta_ts>
            <desc>error on line 81 at column 12: expected &apos;&gt;&apos;</desc>
            <filename>output.xhtml</filename>
            <type>text/plain</type>
            <size>0</size>
            <attacher name="Adrian Bunk">bunk</attacher>
            
              <data encoding="base64"></data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>29891</attachid>
            <date>2009-04-29 12:45:58 -0700</date>
            <delta_ts>2009-04-29 12:45:58 -0700</delta_ts>
            <desc>error on line 58 at column 3: Extra content at the end of the document</desc>
            <filename>output.xhtml</filename>
            <type>text/plain</type>
            <size>0</size>
            <attacher name="Adrian Bunk">bunk</attacher>
            
              <data encoding="base64"></data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>29892</attachid>
            <date>2009-04-29 12:47:20 -0700</date>
            <delta_ts>2009-04-29 12:47:20 -0700</delta_ts>
            <desc>error on line 66 at column 38: expected &apos;&gt;&apos;</desc>
            <filename>output.xhtml</filename>
            <type>text/plain</type>
            <size>0</size>
            <attacher name="Adrian Bunk">bunk</attacher>
            
              <data encoding="base64"></data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>29956</attachid>
            <date>2009-05-02 05:44:30 -0700</date>
            <delta_ts>2009-05-02 12:31:47 -0700</delta_ts>
            <desc>Calculate the size of the string correctly</desc>
            <filename>Calculate-the-size-of-the-string-correctly.patch</filename>
            <type>text/plain</type>
            <size>1559</size>
            <attacher name="Gustavo Noronha (kov)">gustavo</attacher>
            
              <data encoding="base64">MWQxM2M2NGQ4MDE5MzkxNjZjN2Y5ODJhZGMwNGUxZTQ2OTExMzY4OQpkaWZmIC0tZ2l0IGEvV2Vi
S2l0L2d0ay9DaGFuZ2VMb2cgYi9XZWJLaXQvZ3RrL0NoYW5nZUxvZwppbmRleCBkMTk0ZjgxLi5l
YWJmMTQxIDEwMDY0NAotLS0gYS9XZWJLaXQvZ3RrL0NoYW5nZUxvZworKysgYi9XZWJLaXQvZ3Rr
L0NoYW5nZUxvZwpAQCAtMSwzICsxLDE2IEBACisyMDA5LTA1LTAyICBHdXN0YXZvIE5vcm9uaGEg
U2lsdmEgIDxnbnNAZ25vbWUub3JnPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09Q
UyEpLgorCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0y
NTQ2NgorICAgICAgICBXZWJLaXRHdGsrIDEuMS42IHByaW50cyB3ZWlyZCBlcnJvciBtZXNzYWdl
cyBpbiBMaWZlcmVhCisKKyAgICAgICAgVXNlIHN0cmxlbiBpbnN0ZWFkIG9mIGdfdXRmOF9zdHJs
ZW4gd2hlbiBjYWxjdWxhdGluZyB0aGUgc2l6ZSBvZgorICAgICAgICB0aGUgZGF0YSB0aGF0IGlz
IGJlaW5nIGdpdmVu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1YnN0aXR1dGVEYXRhKHNoYXJlZEJ1ZmZlci5yZWxlYXNlKCksCiAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgbWltZVR5cGUgPyBTdHJpbmc6OmZyb21VVEY4KG1pbWVUeXBlKSA6
IFN0cmluZzo6ZnJvbVVURjgoInRleHQvaHRtbCIpLAogICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgIGVuY29kaW5nID8gU3RyaW5nOjpmcm9tVVRGOChlbmNvZGluZykgOiBTdHJpbmc6
OmZyb21VVEY4KCJVVEYtOCIpLAo=
</data>
<flag name="review"
          id="15013"
          type_id="1"
          status="+"
          setter="zecke"
    />
          </attachment>
      

    </bug>

</bugzilla>