readium / swift-toolkit

A toolkit for ebooks, audiobooks and comics written in Swift
https://readium.org/mobile/
BSD 3-Clause "New" or "Revised" License
223 stars 96 forks source link

Validate Link HREFs only when they are not templated #387

Closed mickael-menu closed 5 months ago

mickael-menu commented 5 months ago

If a link HREF is templated (e.g. https://catalog.feedbooks.com/search.json{?query}), it won't be considered a valid URI before it is expanded. So we should not validate a templated URL when parsing a Link from its JSON representation.