зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1745059 [wpt PR 31965] - URLPattern: Escape some suffixes trailing `:foo` groups., a=testonly
Automatic update from web-platform-tests URLPattern: Escape some suffixes trailing `:foo` groups. This CL fixes another problem case from: https://github.com/WICG/urlpattern/issues/145 In this case we need to detect when a group suffix could be mistaken for trailing custom name characters. When this happens we should escape the first character of the suffix. For example: `{:foo\\bar}` instead of `{:foobar}`. Bug: 1263673 Change-Id: I2aa2d043ef4c71433fdc0be113fcafddf5ad3532 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3318605 Reviewed-by: Jeremy Roman <jbroman@chromium.org> Commit-Queue: Ben Kelly <wanderview@chromium.org> Cr-Commit-Position: refs/heads/main@{#949707} -- wpt-commits: 73d24b5e86feab550aa5ab7271a814aaa5882cf7 wpt-pr: 31965
This commit is contained in:
Родитель
cd17759452
Коммит
b46d224e1b
|
@ -2541,5 +2541,29 @@
|
|||
"expected_match": {
|
||||
"pathname": { "input": "foobarbaz", "groups": { "foo": "f", "0": "oobarbaz" }}
|
||||
}
|
||||
},
|
||||
{
|
||||
"pattern": [{ "pathname": "{:foo\\bar}" }],
|
||||
"inputs": [{ "pathname": "foobar" }],
|
||||
"expected_match": {
|
||||
"pathname": { "input": "foobar", "groups": { "foo": "foo" }}
|
||||
}
|
||||
},
|
||||
{
|
||||
"pattern": [{ "pathname": "{:foo\\.bar}" }],
|
||||
"inputs": [{ "pathname": "foo.bar" }],
|
||||
"expected_obj": {
|
||||
"pathname": "{:foo.bar}"
|
||||
},
|
||||
"expected_match": {
|
||||
"pathname": { "input": "foo.bar", "groups": { "foo": "foo" }}
|
||||
}
|
||||
},
|
||||
{
|
||||
"pattern": [{ "pathname": "{:foo(foo)bar}" }],
|
||||
"inputs": [{ "pathname": "foobar" }],
|
||||
"expected_match": {
|
||||
"pathname": { "input": "foobar", "groups": { "foo": "foo" }}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
Загрузка…
Ссылка в новой задаче