-
Notifications
You must be signed in to change notification settings - Fork 408
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
Regression in v4.1.1: failed to detect absolute file path in manifest.item.href #1252
Comments
The directory structure in the above sample epub file is as follows:
The absolute file path in the problem href is |
Thanks for the report @unext-wendong, that regression is definitely something to look into! I'm not quite sure how to deal with it however. Technically, That resolution is under-specified however: it depends on the URL of the Package Document, which is defined by the user agent (the reading system, or in this case, EPUBCheck). That said, both the passing result of v4.2.x and the error message in v4.1.0 look erroneous to me. If the author uses a URL starting with @mattgarrish what do you think? |
Ya, a path starting with a slash is a root-relative path, but I'm not sure if the root is the root of the abstract container or the location of the package document. It seems like it's possible it could change depending on whether the content gets unzipped or not (i.e., would the root shift if only the content directory gets served). I seem to remember this being problematic for web publications, too, because the manifest didn't have to correspond to the root of a (sub)domain and so root-relative paths could reference outside the content of the publication. My gut instinct is we should ban root-relative paths, but it's definitely something for the WG to weigh in on. |
In fact, my concern is not only for root-relative path, but any path really. I'm thinking we should reopen w3c/epub-specs#1374 . I'll follow up there. |
Path absolute URL string are not recommended in 3.3, so I'm going to add the 3.3 label to this issue rather than start another. |
Sample file:
sample.epub.zip
Problem description:
Since v4.1.1, for manifest items with an absolute file path as href in the ODF file, the tool fails to detect it as an error, while it does in v4.1.0 (and earlier versions, e.g. v3.0.1).
Example item description:
Output from v4.1.1
Output from v4.1.0
The text was updated successfully, but these errors were encountered: