[Bug 15904] New: On: The pattern attribute (forms) The spec does not clarify what the reserved characters of the regular expressions are, and what the escape character is, nor whether there is any. The pattern attribute value example ("[0-9][A-Z]{3}") is a trivial one. Bu

https://www.w3.org/Bugs/Public/show_bug.cgi?id=15904

           Summary: On: The pattern attribute (forms) The spec does not
                    clarify what the reserved characters of the regular
                    expressions are, and what the escape character is, nor
                    whether there is any. The pattern attribute value
                    example ("[0-9][A-Z]{3}") is a trivial one. Bu
           Product: HTML WG
           Version: unspecified
          Platform: Other
               URL: http://www.whatwg.org/specs/web-apps/current-work/#top
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P3
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: contributor@whatwg.org
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


Specification: http://dev.w3.org/html5/spec/Overview.html
Multipage: http://www.whatwg.org/C#top
Complete: http://www.whatwg.org/c#top

Comment:
On: The pattern attribute (forms)

The spec does not clarify what the reserved characters of the regular
expressions are, and what the escape character is, nor whether there is any.

The pattern attribute value example ("[0-9][A-Z]{3}") is a trivial one.

But what if the pattern value contains a forward-slash?

Is it:      <input pattern="[0-9]/[A-Z]{3}" name="part" />

Or is it: <input pattern="[0-9]\/[A-Z]{3}" name="part" />

Are user agents supposed to escape reserved characters in the expression
before compiling it?  And if so, how can that work reliably across
implementations?

As the pattern also needs to be validated on the server-side, and the
server-side also uses regular expressions, the same question exists there.  It
actually turns into a problem, as it's not clear who's responsible for
escaping characters in the regular expression, and which reserved characters,
if any, actually need to be escaped.

Reply-To: sun@unleashedmind.com
Cause: http://drupal.org/node/1174766


Posted from: 91.19.60.83
User agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.13)
Gecko/20101203 Firefox/3.6.13

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Monday, 6 February 2012 11:18:37 UTC