{
"pattern": [{ "pathname": "./foo/bar", "baseURL": "https://example.com" }],
"inputs": [{ "pathname": "foo/bar", "baseURL": "https://example.com" }],
"exactly_empty_components": [ "port" ],
"expected_obj": {
"pathname": "/foo/bar"
},
"expected_match": {
"protocol": { "input": "https", "groups": {}},
"hostname": { "input": "example.com", "groups": {}},
"pathname": { "input": "/foo/bar", "groups": {}}
}
},
What is the issue with the URL Pattern Standard?
Referencing a WPT test:
canonicalize_pathname method adds
/-and removes/-from the method for several reasons. Ref: https://urlpattern.spec.whatwg.org/#canonicalize-a-pathnameWhy does the expected_obj has a pathname of
/foo/barbut not./foo/bar?cc @annevk @jeremyroman would you mind helping me understand the behavior here?