<?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>25199</bug_id>
          
          <creation_ts>2009-04-14 20:21:31 -0700</creation_ts>
          <short_desc>Some text escaped as gb2312 on map.sogou.com</short_desc>
          <delta_ts>2009-04-15 12:04:23 -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>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>9063</dup_id>
          
          <bug_file_loc>http://map.sogou.com/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter>xlyuan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>johnnyding.webkit</cc>
    
    <cc>jshin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>117557</commentid>
    <comment_count>0</comment_count>
    <who name="">xlyuan</who>
    <bug_when>2009-04-14 20:21:31 -0700</bug_when>
    <thetext>Build: WebKit-r42277, 2009-04-09
   OS: Windows, not test on Mac

Other Browsers:
Chromium trunk: Fail
      Firefox3: OK
           IE8: OK

Steps:
1. Launch Safari
2. Go to http://map.sogou.com/
3. Search text &quot;&amp;#26597;&amp;#35810;&amp;#33539;&amp;#22260;&quot;
4. Observe

Result:
Texts followed with &amp;#26597;&amp;#35810;&amp;#33539;&amp;#22260; escaped as %C8%AB%B9%FA (which is &amp;#20840;&amp;#22269; escaped 
as gb2312)

Expected:
Original text &amp;#20840;&amp;#22269; should display</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117563</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2009-04-14 21:39:50 -0700</bug_when>
    <thetext>*** Bug 25200 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117583</commentid>
    <comment_count>2</comment_count>
      <attachid>29493</attachid>
    <who name="johnnyding">johnnyding.webkit</who>
    <bug_when>2009-04-15 01:26:05 -0700</bug_when>
    <thetext>Created attachment 29493
testcase for reproducing this problem

The problem is because webkit doesn&apos;t support load method for document object. Sogou need to use document.load to load the unescaped data. Firefox supports load method for document object. So it&apos;s OK.

I wrote a test case based on some js code extracted from http://key.go2map.com/lib/js/k4.js</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117584</commentid>
    <comment_count>3</comment_count>
      <attachid>29494</attachid>
    <who name="johnnyding">johnnyding.webkit</who>
    <bug_when>2009-04-15 01:27:14 -0700</bug_when>
    <thetext>Created attachment 29494
data file for this testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117586</commentid>
    <comment_count>4</comment_count>
    <who name="johnnyding">johnnyding.webkit</who>
    <bug_when>2009-04-15 01:38:05 -0700</bug_when>
    <thetext>I believe it&apos;s a duplicated bug of https://bugs.webkit.org/show_bug.cgi?id=9063</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117640</commentid>
    <comment_count>5</comment_count>
    <who name="Jungshik Shin">jshin</who>
    <bug_when>2009-04-15 12:04:23 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 9063 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>29493</attachid>
            <date>2009-04-15 01:26:05 -0700</date>
            <delta_ts>2009-04-15 01:26:05 -0700</delta_ts>
            <desc>testcase for reproducing this problem</desc>
            <filename>test_decode.htm</filename>
            <type>text/html</type>
            <size>1429</size>
            <attacher name="johnnyding">johnnyding.webkit</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgVHJhbnNpdGlvbmFs
Ly9FTiIgImh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXRyYW5zaXRpb25h
bC5kdGQiPgo8SFRNTD48SEVBRD48TUVUQSBodHRwLWVxdWl2PSJDb250ZW50LVR5cGUiIGNvbnRl
bnQ9InRleHQvaHRtbDsgY2hhcnNldD1HQksiPgo8VElUTEU+dGVzdCBzb2dvdSBlbmNvZGluZyBw
cm9ibGVtPC9USVRMRT4KCjxib2R5Pgp0ZXh0IGVzY2FwZWQgYXMgR0JLIDogJUM4JUFCJUI5JUZB
IDxicj4KPHNjcmlwdD4KZnVuY3Rpb24gX2dldERvbUZyb21GaWxlKGEpewogIHZhciBiLGM7CiAg
dHJ5ewogICAgaWYgKHR5cGVvZiBBY3RpdmVYT2JqZWN0IT0idW5kZWZpbmVkIiAmJiB0eXBlb2Yg
R2V0T2JqZWN0IT0idW5kZWZpbmVkIikgewogICAgICBiID0gbmV3IEFjdGl2ZVhPYmplY3QoIk1p
Y3Jvc29mdC5YTUxET00iKTsKICAgIH0gZWxzZSBpZiAoZG9jdW1lbnQuaW1wbGVtZW50YXRpb24p
ewogICAgICBiID0gZG9jdW1lbnQuaW1wbGVtZW50YXRpb24uY3JlYXRlRG9jdW1lbnQoIiIsICJk
b2MiLCBudWxsKTsKICAgIH0KICAgIGIuYXN5bmMgPSBmYWxzZTsKICAgIGMgPSBiLmxvYWQoYSk7
CiAgICBpZiAoYi5wYXJzZUVycm9yICYmIGIucGFyc2VFcnJvci5lcnJvckNvZGUpewogICAgICBy
ZXR1cm4gInBhcnNlIGVycm9yIDogIiArIGIucGFyc2VFcnJvci5lcnJvckNvZGU7CiAgICB9CiAg
ICByZXR1cm4gYjsKICB9IGNhdGNoIChjKSB7CiAgICByZXR1cm4gImV4Y2VwdGlvbiA6ICIgKyBj
LnRvU3RyaW5nKCk7CiAgfQp9CgpmdW5jdGlvbiB0ZXN0KCkgewogIHZhciBlc2NhcGVkX2NpdHkg
PSAiJUM4JUFCJUI5JUZBIjsKICAvLyBUaGUgb3JpZ2luYWwgdXJsIGlzICJodHRwOi8vbWFwLnNv
Z291LmNvbS9tYXA0MTIvaW5jL2RlY29kZS5qc3A/dz0iICsgZXNjYXBlZF9jaXR5LgogIC8vIFNp
bmNlIHdlIGNhbiBub3QgcmVxdWVzdCBjcm9zcyBkb21haW4gY29udGVudCBpbiBoZXJlLCBJIGp1
c3Qgc2F2ZSB0aGUgcmVzdWx0IHRvIGZpbGUKICAvLyBhbmQgdXNlIGl0LgogIHZhciB1cmwgPSAi
ZGVjb2RlLmpzcC54bWwiOwogIHZhciB0bXBPYmogPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJp
bWciKTsKICB0bXBPYmouc3JjID0gdXJsOwogIHZhciBkID0gX2dldERvbUZyb21GaWxlKHRtcE9i
ai5zcmMpOwogIGlmICh0eXBlb2YgZCA9PSAic3RyaW5nIikKICAgIGRvY3VtZW50LndyaXRlKCJ0
ZXh0IHVuZXNjYXBlZCBjb2RlIDogIiArIGQpOwogIGVsc2UgewogICAgYSA9IGQuZ2V0RWxlbWVu
dHNCeVRhZ05hbWUoIkRhdGEiKVswXS5nZXRBdHRyaWJ1dGUoIndvcmQiKTsKICAgIGRvY3VtZW50
LndyaXRlKCJ0ZXh0IHVuZXNjYXBlZCBjb2RlIDogIiArIGEpOwogIH0KfQp0ZXN0KCk7Cjwvc2Ny
aXB0Pg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>29494</attachid>
            <date>2009-04-15 01:27:14 -0700</date>
            <delta_ts>2009-04-15 01:27:14 -0700</delta_ts>
            <desc>data file for this testcase</desc>
            <filename>decode.jsp.xml</filename>
            <type>application/xml</type>
            <size>23</size>
            <attacher name="johnnyding">johnnyding.webkit</attacher>
            
              <data encoding="base64">DQo8RGF0YSB3b3JkPSLlhajlm70iLz4=
</data>

          </attachment>
      

    </bug>

</bugzilla>