Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is navigation to data URLs allowed? #1213

Closed
xworld21 opened this issue Mar 6, 2021 · 4 comments
Closed

Is navigation to data URLs allowed? #1213

xworld21 opened this issue Mar 6, 2021 · 4 comments
Assignees
Labels
status: completed Work completed, can be closed type: spec The issue is related to a Specification update
Milestone

Comments

@xworld21
Copy link

xworld21 commented Mar 6, 2021

I have noticed that if you write an <a href="data:application/xhtml+xml;..."> link inside an EPUB, it will pass epubcheck but it will break quite a lot of readers. In the case of Apple Books, you will not be able to navigate back unless you trigger a relayout of the content.

I am trying to understand if this is a bug in the readers, a behaviour out of spec, or just a grey area. I gather that data URLs used in this way are implicitly disallowed by the spec, because you can't point to them in the manifest or in the table of contents. Can somebody please clarify? If this is non-compliant behaviour, then it should be checked by epubcheck, I suppose.

For context, LaTeXML produces EPUBs snippets of code embedded into data URLs, causing the problems I just mentioned.

Minimal example attached.

@rdeltour
Copy link
Member

rdeltour commented Mar 9, 2021

Thanks for the report, good question! As far as I can see this is allowed by the spec, but I may be wrong. What do you think @mattgarrish?

In any case, this issue may be better discussed in w3c/epub-specs.

@rdeltour rdeltour added status: in discussion The issue is being discussed by the development team type: spec The issue is related to a Specification update labels Mar 9, 2021
@mattgarrish
Copy link
Member

Wouldn't this have to be an error because you can only navigate to publication resources that are listed in the spine (and by extension the manifest)?

The same applies to data URLs for embedding content. They also run afoul of publication resources having to be listed in the manifest.

We could certainly make this clearer in the spec, though.

@rdeltour
Copy link
Member

rdeltour commented Dec 8, 2022

This should be checked since #1412, but adding to the v5.0.0-rc milestone to double check.

@rdeltour rdeltour self-assigned this Dec 8, 2022
@rdeltour rdeltour added status: needs test case A reproducible test case is needed to move the issue forward and removed status: in discussion The issue is being discussed by the development team labels Dec 8, 2022
@rdeltour rdeltour added this to the v5.0.0-rc milestone Dec 8, 2022
@rdeltour rdeltour added status: completed Work completed, can be closed and removed status: needs test case A reproducible test case is needed to move the issue forward labels Dec 15, 2022
@rdeltour
Copy link
Member

Closing. This is now disallowed and reported by EPUBCheck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: completed Work completed, can be closed type: spec The issue is related to a Specification update
Projects
None yet
Development

No branches or pull requests

3 participants