EPUBCheck RSC-020: invalid URL syntax in a link
Updated:
EPUBCheck RSC-020 is an error message: “"…" is not a valid URL (…).” A URL in the EPUB is not syntactically valid. Reading apps may fail to follow the link or load the resource, and the message gives the URL and the reason in brackets.
The official message
"%1$s" is not a valid URL (%2$s)
- Default severity
- Error. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.
- EPUBCheck version
- 5.4.0
%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.
Typical causes
- Unencoded spaces or other characters that must be percent-encoded in a URL.
- Backslashes used as path separators (a Windows habit) instead of forward slashes.
- A typo in the scheme part of an absolute URL (a link whose scheme is well formed but not registered is HTM-025 instead).
How to fix it
- Find the URL named in the message.
- Percent-encode spaces as %20 and other reserved characters, and use forward slashes.
- Or rename the file so its URL needs no encoding, then validate again.
When it's not this
If the URL is valid but the file it names is missing, that is RSC-007.
Terms used here
Other RSC messages
RSC-019EPUBs with Multiple Renditions should contain a META-INF/metadata.xml file.RSC-017Warning while parsing file: …RSC-016Fatal Error while parsing file: …RSC-024Informative parsing warning: …RSC-015A fragment identifier is required for svg use tag references.RSC-025Informative parsing error: …
Sources
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.