Skip to content
EPUBCheck · Resources and references

EPUBCheck RSC-026: URL leaks outside the EPUB

Updated:

EPUBCheck RSC-026 is an error message: “URL "…" leaks outside the container (it is not a valid-relative-ocf-URL-with-fragment string).” A relative URL climbs above the root of the EPUB (too many ../), pointing outside the container. Reading apps cannot follow it, so the link or resource is broken.

The official message

URL "%1$s" leaks outside the container (it is not a valid-relative-ocf-URL-with-fragment string)

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

  • A path written for the original folder structure that has one ../ too many.
  • Files moved into a different folder depth without updating their relative links.

How to fix it

  1. Find the URL named in the message and the document that contains it.
  2. Count the folders between the document and the target and correct the relative path so it stays inside the book.
  3. Validate again.

When it's not this

A path that stays inside the book but names a missing file is RSC-007.

Terms used here

Other RSC messages

  • RSC-025 Informative parsing error: …
  • RSC-027 XML document is encoded in UTF-16. It should be encoded in UTF-8 instead.
  • RSC-024 Informative parsing warning: …
  • RSC-028 XML documents must be encoded in UTF-8, but … was detected.
  • RSC-029 Data URL is not allowed in this context.
  • RSC-030 File URLs are not allowed in EPUB, but found "…".

Sources

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.

FAQ

What does EPUBCheck RSC-026 mean?

EPUBCheck RSC-026 is an error message: “URL "…" leaks outside the container (it is not a valid-relative-ocf-URL-with-fragment string).” A relative URL climbs above the root of the EPUB (too many ../), pointing outside the container. Reading apps cannot follow it, so the link or resource is broken.

Is RSC-026 an error?

RSC-026 is reported as error by default. 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.