Skip to content

Commit 8073bae

Browse files
committed
Use "v" instead of "u" for the pattern="" attribute
Fixes #3680. Closes #3681. Follows whatwg/html#7908.
1 parent d77ffd0 commit 8073bae

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

lib/jsdom/living/nodes/HTMLInputElement-impl.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,8 +1025,8 @@ class HTMLInputElementImpl extends HTMLElementImpl {
10251025
// The pattern attribute should be matched against the entire value, not just any
10261026
// subset, so add ^ and $ anchors. But also check the validity of the regex itself
10271027
// first.
1028-
new RegExp(pattern, "u"); // eslint-disable-line no-new
1029-
regExp = new RegExp("^(?:" + pattern + ")$", "u");
1028+
new RegExp(pattern, "v"); // eslint-disable-line no-new
1029+
regExp = new RegExp("^(?:" + pattern + ")$", "v");
10301030
} catch {
10311031
return false;
10321032
}

test/web-platform-tests/to-run.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,6 @@ formaction.html: [fail, Unknown]
15381538

15391539
DIR: html/semantics/forms/constraints
15401540

1541-
form-validation-validity-patternMismatch.html: [fail, Unknown]
15421541
form-validation-validity-valueMissing.html: [fail, 'Spec unclear (see https://github.com/whatwg/html/issues/5202)']
15431542
form-validation-willValidate.html:
15441543
"[INPUT in COLOR status] Must be barred from the constraint validation if it is readonly": [fail, Not implemented]
@@ -1631,7 +1630,6 @@ input-type-checkbox-switch.tentative.window.html: [fail, Unknown]
16311630
input-untrusted-key-event.html: [fail-slow, Not implemented]
16321631
input-valueasnumber.html:
16331632
"valueAsNumber setter on type month (actual valueAsNumber: -1, expected value: 1969-12)": [fail, Unknown]
1634-
pattern_attribute_v_flag.html: [fail, Unknown]
16351633
radio-disconnected-group-owner.html: [fail, Unknown]
16361634
radio-input-cancel.html:
16371635
"radio input cancel behavior reverts previous selected radio input state": [fail, Unknown]

0 commit comments

Comments
 (0)