kenchris / urlpattern-polyfill

URLPattern polyfill
https://www.npmjs.com/package/urlpattern-polyfill
MIT License
267 stars 30 forks source link

Fix pathname canonicalization for input with non-standard protocols. #18

Closed wanderview closed 3 years ago

wanderview commented 3 years ago

The test() and exec() methods also perform canonicalization on their input on a component-by-component basis when the dictionary is passed. In those cases we must be careful to use the correct type of pathname canonicalization based on the protocol value. Special schemes like 'https' get more typical encoding, but schemes like 'data' get a less strict form of encoding.

This change also cleans up some fallback strings in test() and exec() that are no longer needed.

wanderview commented 3 years ago

This is part of #7.