- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
EPUB: Relative URL strings must not have a query component #11598
Comments
Unfortunately, we want to include them in the HTML output. So, should we strip them for EPUB files, possibly renaming the files when writing the output? @AA-Turner any thoughts on that one? |
Not sure if I'm missing something, but believe the checksums are not useful even while previewing the docs locally. Still need to use |
I am a bit rusty with HTML specs but here are some thoughts:
Now, in HTML, the URLs can be any non-empty URLs1 but in EPUB, the specifications restrict them to be URLs with optional fragment strings (but no query strings)2. As such, I confirm it's an issue for EPUB outputs but this should be kept in HTML outputs. I think most of the EPUB implementations use a regular HTML parser so they don't fail on that. I never worked with the EPUB builder, so I don't know how hard it would be to specialise this behaviour. @AA-Turner Do you plan to follow EPUB3.3 specs or deviate in this specific case to reduce the work? Footnotes |
Hi! 👋 In effect all hardware ereaders that I could test on so far ignore the CSS of the generated EPUB entirely (which is problematic). Desktop software, such as calibre's ebook-viewer appears to be fine (as it uses qt's webengine for rendering). |
If the EPUB builder is detected, do not add checksums in a query component to the URL of css and js assets. The XHTML in EPUBs does not allow the use of query components in relative URLs. The checksumming of assets, introduced in 0241c58 unconditionally adds a query component for the checksum, which breaks rendering on many enduser devices (tested on e.g. Kindle Paperwhite 3, Kobo Aura H2O Edition 2). Fixes sphinx-doc#11598 Signed-off-by: David Runge <dave@sleepmap.de>
If the EPUB builder is detected, do not add checksums in a query component to the URL of css and js assets. The XHTML in EPUBs does not allow the use of query components in relative URLs. The checksumming of assets, introduced in ae20669 unconditionally adds a query component for the checksum, which breaks rendering on many enduser devices (tested on e.g. Kindle Paperwhite 3, Kobo Aura H2O Edition 2). Fixes sphinx-doc#11598 Signed-off-by: David Runge <dave@sleepmap.de>
Describe the bug
With the addition of checksums to static files ( #11415 ), EPUBs created using
make epub
, fail to validateHere is a sample output from EPUBCheck:
How to Reproduce
index.rst
conf.py
Environment Information
Sphinx extensions
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: