This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 12555 - 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 'ab' in a more "greedy" way if compiled as the informative note suggests. As-is, implementat
Summary: The informative note has contents that should be clearer in the normative tex...
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-26 07:41 UTC by contributor
Modified: 2011-08-04 05:02 UTC (History)
6 users (show)

See Also:


Attachments
Test case. The normative text should specify something that makes this test pass in all conforming implementations :) (573 bytes, text/html)
2011-04-26 07:52 UTC, Hallvord R. M. Steen
Details

Description contributor 2011-04-26 07:41:19 UTC
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 'ab' in a more "greedy" 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 <input value="ab" pattern="(a|ab)"> 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
Comment 1 Hallvord R. M. Steen 2011-04-26 07:52:39 UTC
Created attachment 978 [details]
Test case. The normative text should specify something that makes this test pass in all conforming implementations :)
Comment 2 Hallvord R. M. Steen 2011-04-26 07:57:17 UTC
Suggested edit:

replace 

when compiled as a JavaScript regular expression with the <code title="">global</code>, <code title="">ignoreCase</code>, and <code title="">multiline</code> flags <em>disabled</em>

with 

when compiled as a JavaScript regular expression prefixed by '^(?', postfixed by '$)' and with the <code title="">global</code>, <code title="">ignoreCase</code>, and <code title="">multiline</code> flags <em>disabled</em>
Comment 3 Ian 'Hixie' Hickson 2011-07-15 22:10:38 UTC
EDITOR'S RESPONSE: This is an Editor'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=")("

However, I've tried to add to the relevant prose to be clearer.
Comment 4 contributor 2011-07-15 22:11:27 UTC
Checked in as WHATWG revision r6309.
Check-in comment: Try to clarify some of the conformance requirements around pattern=''.
http://html5.org/tools/web-apps-tracker?from=6308&to=6309
Comment 5 Michael[tm] Smith 2011-08-04 05:02:13 UTC
mass-moved component to LC1