Weaken validity checks on URL fields

Issue #6 closed
Chris Fuller created an issue

It turns out that although the schema calls these URLs, they are in fact URIs, meaning that they are much more permissive about what they allow. This includes things like empty strings, blob: locators, not specifying the scheme, and a lot of other garbage like that.

It’s really questionable that we’re willing to tolerate all of this, but it isn’t this library’s responsibility to tell the editor team what they should be willing to accept. They own the schema and its validation, and this library should just respect that, within reason.

The library will:

  • Weaken setter validation from URL syntax to URI syntax
  • Change all internal storage of these values from URL or URI to String
  • Change getters and operations like fold to work with String instead of URL

This is an API-breaking change, and hopefully the last one before we’re ready for the 1.0.0 release.

Comments (2)

  1. Log in to comment