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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>12555</bug_id>
          
          <creation_ts>2011-04-26 07:41:19 +0000</creation_ts>
          <short_desc>The informative note has contents that should be clearer in the normative text. Namely, a regular expression with alternate branches (a|ab) will match the string &apos;ab&apos; in a more &quot;greedy&quot; way if compiled as the informative note suggests.  As-is, implementat</short_desc>
          <delta_ts>2011-08-04 05:02:13 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>LC1 HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#the-pattern-attribute</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ayg</cc>
    
    <cc>hsteen</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>47683</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-04-26 07:41:19 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html
Section: http://www.whatwg.org/specs/web-apps/current-work/#the-pattern-attribute

Comment:
The informative note has contents that should be clearer in the normative
text. Namely, a regular expression with alternate branches (a|ab) will match
the string &apos;ab&apos; in a more &quot;greedy&quot; way if compiled as the informative note
suggests.  As-is, implementations that follow the normative text will be
incompatible with implementations that also take the informative note into
account for the &lt;input value=&quot;ab&quot; pattern=&quot;(a|ab)&quot;&gt; case.

Posted from: 218.120.54.137
User agent: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.9.119 Version/11.10</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47684</commentid>
    <comment_count>1</comment_count>
      <attachid>978</attachid>
    <who name="Hallvord R. M. Steen">hsteen</who>
    <bug_when>2011-04-26 07:52:39 +0000</bug_when>
    <thetext>Created attachment 978
Test case. The normative text should specify something that makes this test pass in all conforming implementations :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47685</commentid>
    <comment_count>2</comment_count>
    <who name="Hallvord R. M. Steen">hsteen</who>
    <bug_when>2011-04-26 07:57:17 +0000</bug_when>
    <thetext>Suggested edit:

replace 

when compiled as a JavaScript regular expression with the &lt;code title=&quot;&quot;&gt;global&lt;/code&gt;, &lt;code title=&quot;&quot;&gt;ignoreCase&lt;/code&gt;, and &lt;code title=&quot;&quot;&gt;multiline&lt;/code&gt; flags &lt;em&gt;disabled&lt;/em&gt;

with 

when compiled as a JavaScript regular expression prefixed by &apos;^(?&apos;, postfixed by &apos;$)&apos; and with the &lt;code title=&quot;&quot;&gt;global&lt;/code&gt;, &lt;code title=&quot;&quot;&gt;ignoreCase&lt;/code&gt;, and &lt;code title=&quot;&quot;&gt;multiline&lt;/code&gt; flags &lt;em&gt;disabled&lt;/em&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51166</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-07-15 22:10:38 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Partially Accepted
Change Description: see diff given below
Rationale: 

The sentence in question is only defining the document conformance criteria, and the edit you suggest would break the conformance criteria. For example, it would make the following not invalid:

   pattern=&quot;)(&quot;

However, I&apos;ve tried to add to the relevant prose to be clearer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51167</commentid>
    <comment_count>4</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-07-15 22:11:27 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r6309.
Check-in comment: Try to clarify some of the conformance requirements around pattern=&apos;&apos;.
http://html5.org/tools/web-apps-tracker?from=6308&amp;to=6309</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52518</commentid>
    <comment_count>5</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:02:13 +0000</bug_when>
    <thetext>mass-moved component to LC1</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>978</attachid>
            <date>2011-04-26 07:52:39 +0000</date>
            <delta_ts>2011-04-26 07:52:39 +0000</delta_ts>
            <desc>Test case. The normative text should specify something that makes this test pass in all conforming implementations :)</desc>
            <filename>CORE-38209.htm</filename>
            <type>text/html</type>
            <size>573</size>
            <attacher name="Hallvord R. M. Steen">hsteen</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+DQo8aHRtbD48aGVhZD4NCgk8dGl0bGU+IEBwYXR0ZXJuIGFuZCByZWdl
eHAgd2l0aCBhbHRlcm5hdGUgYnJhbmNoZXMgPC90aXRsZT4NCjwvaGVhZD4NCjxib2R5Pg0KDQoJ
PHA+RkFJTEVEIChUaGlzIFRDIHJlcXVpcmVzIEphdmFTY3JpcHQgZW5hYmxlZCk8L3A+DQoJPGZv
cm0+PGlucHV0IHZhbHVlPSJhYiIgcGF0dGVybj0iKGF8YWIpIj48L2Zvcm0+DQoNCgk8c2NyaXB0
IHR5cGU9InRleHQvamF2YXNjcmlwdCI+DQoJDQoJZnVuY3Rpb24gdGVzdCgpew0KCQl2YXIgbG9n
PWRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCdwJylbMF0uZmlyc3RDaGlsZDsNCgkJdmFy
IHBhc3NlZCA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCdpbnB1dCcpWzBdLnZhbGlk
aXR5LnBhdHRlcm5NaXNtYXRjaCA9PT0gZmFsc2U7DQoJCWxvZy5kYXRhID0gKHBhc3NlZCkgPyAn
UEFTU0VEJyA6ICdGQUlMRUQnIDsNCgkJdHJ5e3RvcC5vcGVuZXIucnIocGFzc2VkKTt9Y2F0Y2go
ZSl7fQ0KCX0NCgl3aW5kb3cub25sb2FkPXRlc3Q7DQoJPC9zY3JpcHQ+DQoNCjwvYm9keT48L2h0
bWw+
</data>

          </attachment>
      

    </bug>

</bugzilla>