-
Notifications
You must be signed in to change notification settings - Fork 402
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
Error/Warning for unescaped filenames in manifest #819
Comments
Hi all! I’m doing this the task. After the fix some tests have begun to fall. Most of these tasks I know how fix, but test “interesting_paths_epub2” no have check parameters. It needs change package. It is permissible? |
I'm finally looking into this (sorry for the late answer!). Unfortunately I couldn't reproduce: with
I'm closing as |
Isn't the problem that epubcheck warns that the filenames should be URI escaped, but then doesn't report that the names are used without URI escaping in the package document? The warning doesn't go away if you percent encode the spaces in the manifest entries, so I'm assuming the package document is not where the warning is coming from (if it is, it's confusing that it references the files themselves with line and offset of -1,-1). |
Oh right I see. I assumed the warning came from the OPF, but yes you're right it doesn't go away when the URLs are properly encoded there. Isn't it a bit overzealous to report these as warnings however? In any case, yes a check should be added to report the non-escaped URI in OPF: I assume that should be an error, correct? |
I mean, as far as I understand this only comes from a Note, saying:
|
There was a long discussion about banning spaces in file names during 3.1 because they tend to cause problems, but we decided not to. That sprang up because we had some examples in OCF where the container.xml references had spaces that weren't percent encoded. Did this warning maybe spring out of that discussion? The lack of URI encoding is definitely a problem that needs reporting, but if we implement that then I'm not sure it matters that we also warn about the file names themselves - at least not until OCF makes some statement about their status. |
OK, so I suggest:
@mattgarrish OK for you? |
Sure, that works for now. Let me reopen that issue and see if we can get better guidance within the spec. |
This allows us to test the actual contents of the manifest in the package file, and allows us to move the filename with space test out of the EPUB validation test, which is desirable because it throws a validation warning even when the filename is properly escaped (w3c/epubcheck#819) Also move fixXMLId closer to where it's used
Hi,
I've noticed that Epubcheck emits the warning "Filename contains spaces, therefore URI escaping is necessary. Consider removing spaces from filename." (PKG_010) for filenames containing spaces, but does not produce an error if these filenames are not URI-escaped when they are referenced in the manifest.
Apple Transporter will reject epub files with unescaped spaces in paths in the manifest (but does not mind spaces in the actual filenames as long as they are escaped in the manifest), so it would be great if you could consider adding this as a validation error.
Please see the attached file for an example (Github does not allow epubs, therefore renamed to .zip)
alice.zip
Many thanks!
The text was updated successfully, but these errors were encountered: