Bug 151598 - HTML `pattern` attribute should set `u` flag for regular expressions
Summary: HTML `pattern` attribute should set `u` flag for regular expressions
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: https://mathiasbynens.be/demo/pattern-u
Depends on: 151597 154842 156044
  Show dependency treegraph
Reported: 2015-11-25 02:27 PST by Mathias Bynens
Modified: 2017-01-20 13:48 PST (History)
9 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Mathias Bynens 2015-11-25 02:27:31 PST
As soon as support for the `u` flag is completed, it should be enabled for the HTML `pattern` attribute as well.

Spec: https://html.spec.whatwg.org/multipage/forms.html#the-pattern-attribute

“If an input element has a pattern attribute specified, and the attribute's value, when compiled as a JavaScript regular expression with only the "u" flag specified, compiles successfully, then the resulting regular expression is the element's compiled pattern regular expression. If the element has no such attribute, or if the value doesn't compile successfully, then the element has no compiled pattern regular expression.”
Comment 1 Mathias Bynens 2016-03-31 01:04:54 PDT
Test case: https://mathiasbynens.be/demo/pattern-u
Comment 2 Simon Pieters 2016-05-02 03:07:38 PDT
See https://github.com/whatwg/html/issues/439
Comment 3 Mathias Bynens 2016-06-07 01:56:27 PDT
This is already available in stable Firefox and it will ship in Chrome 53 and Opera 40.
Comment 4 Mathias Bynens 2016-09-27 07:50:35 PDT
This is now shipped in stable versions of Firefox, Chrome, and Opera. Please implement and ship this as soon as possible to avoid annoying interoperability issues.