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

OPF manifest item href with percent-encoded URL results in filepath failure #290

Closed
gregoriopellegrino opened this issue Sep 5, 2019 · 9 comments

Comments

@gregoriopellegrino
Copy link

Please provide the following details if possible or relevant:

  • Ace GUI 1.0.0-rc.1
  • macOS 10.14.5

I downloaded an EPUB 2, launched the DAISY app, selected it for checking, but I get no results.

In the log I see:

Running Ace on /Users/uu/Downloads/Test ebook.epub
[object Object]

I can send you the file privately.

@danielweck
Copy link
Member

Thank you for the report!
Do you get the same result with Ace CLI?

@danielweck danielweck transferred this issue from daisy/ace Sep 5, 2019
@danielweck
Copy link
Member

PS: I moved this issue to the Ace GUI repository, as per your issue description.

@danielweck
Copy link
Member

Could you please share (privately) the EPUB file with me [email protected]
Thanks!

@gregoriopellegrino
Copy link
Author

On Ace CLI I get

info:    Processing /Users/uu/Downloads/Test ebook.epub
info:    Parsing EPUB
error:   Failed to parse EPUB
error:   Unexpected error: ENOENT: no such file or directory, open '/var/folders/p3/k6l3_3qn7sjdlzshshj4dg2h0000gn/T/tmp-1126u0hnbQ4MurYI/OEBPS/Senza%20titolo-1.xhtml'
info:    Closing logs.

@danielweck
Copy link
Member

Immediately I see that the space character in the filename is escaped for URL usage (%20), so perhaps this is the cause.

@gregoriopellegrino
Copy link
Author

I think the same, but it is possible in EPUBs, is it?

The EPUBcheck reports warnings about filenames with spaces, but no errors.

@danielweck danielweck transferred this issue from daisy/ace-gui Oct 25, 2019
@danielweck
Copy link
Member

I am able to reproduce this bug in the latest "beta" Ace CLI ( https://www.npmjs.com/package/@daisy/ace/v/1.2.0-beta.4 ) from this PR / branch #236
This is definitely an issue related to URL escaping / percent-encoding. I am looking into it.

@danielweck danielweck changed the title No results "[object Object]" OPF manifest item href with percent-encoded URL results in filepath failure Oct 25, 2019
@danielweck
Copy link
Member

The latest "beta" version (1.2.0-beta.4) of Ace includes a fix for this issue (i.e. proper handling of URL percent-encoding and HTML URL escaping on all ZIP resources, including support for non-ASCII chars in file names).

@gregoriopellegrino I tested the fix with your publication Zenaro esercitazione ebook.epub
You may try this yourself by installing Ace "beta" from the next NPM release channel:
npm install --global @daisy/ace@next (alternatively, you may remove --global to install the Ace packages locally, inside a folder-contained NPM project)

Notes to developers:
https://www.npmjs.com/package/@daisy/ace/v/1.2.0-beta.4
... is built from the codebase in this PR / branch #236

Git commit:
009142f

New unit test:
0d143bb

@gregoriopellegrino
Copy link
Author

It works great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants