jaketmp / ePub-quicklook

NOTE: Not working in Mojave and later! ePub quicklook and spotlight plugins for Mac OS X.
BSD 3-Clause "New" or "Revised" License
570 stars 58 forks source link

OPF hrefs are URI-encoded #31

Closed chrisridd closed 12 years ago

chrisridd commented 12 years ago

I foolishly created a book with a cover image filename containing a space. This is written into the OPF (by Sigil) as:

<item href="Images/Dune%20Messiah.jpg" id="cover-image" media-type="image/jpeg" />

JTPepub's -cover method is unable to open the image, as it tries to open that literal name.

The filename in the zip file really does have a space:

95667  05-03-12 18:53   OEBPS/Images/Dune Messiah.jpg

The bug is that href values are URIs (not paths) which need decoding in order to be 'openable'. (So -textFromManifestItem: has the same problem.)