<?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>14636</bug_id>
          
          <creation_ts>2007-07-17 03:00:44 -0700</creation_ts>
          <short_desc>REGRESSION: broken tags with unpaired quote prevents encode autodetection</short_desc>
          <delta_ts>2010-10-15 13:13:36 -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>Page Loading</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>http://developer.apple.com/jp/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction, InRadar, Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>808caaa4.8ce9.9cd6c799e9f6</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>darin</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>dimich</cc>
    
    <cc>emacemac7</cc>
    
    <cc>ian</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>4551</commentid>
    <comment_count>0</comment_count>
    <who name="">808caaa4.8ce9.9cd6c799e9f6</who>
    <bug_when>2007-07-17 03:00:44 -0700</bug_when>
    <thetext>// derived from bugs#14601

With some broken meta tags like:

&gt; &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=&quot;utf-8&quot;&gt;

detectJapaneseEncoding() seems to not to be called.

For not-collectly-paired \x22, checkForHeadCharset() lost sync for quote and
runs out whole the content absorbed with returns-false
(at &apos;if(ptr == pEnd) return false;&apos; line 588).

Tag/content may not contain linefeeds with almost websites.
I think successfully aborting at scanning quote pair
when linefeed occuered is with reality.

My experimental code.
-----
while (ptr != pEnd &amp;&amp; *ptr != quoteMark)
{
	if(*ptr==&apos;\r&apos; || *ptr==&apos;\n&apos;){
		// too long tag content : may lost sync
		// successfully bail out
		m_checkedForHeadCharset = true;
		return true;
	}
++ptr;
}
-----</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4552</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-07-17 04:00:18 -0700</bug_when>
    <thetext>This is a regression from shipping WebKit, upgrading to P1.

See &lt;http://www.whatwg.org/specs/web-apps/current-work/#get-an&gt; - if I&apos;m reading it correctly, we are not supposed to honor such a META. Which might mean that we need to suggest a correction to the HTML5 algorithm.

Also, I&apos;m not sure why Firefox works - it&apos;s possible that it ignores the META, and auto-detects the encoding based on page text analysis.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4518</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-17 08:27:30 -0700</bug_when>
    <thetext>*** Bug 14643 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4519</commentid>
    <comment_count>3</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-17 08:29:01 -0700</bug_when>
    <thetext>&lt;rdar://problem/5340161&gt;

</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>