Those epubs would/should never pass epubcheck at all as even the spaces in the original opf manifest are not properly url encoded either! That manifest item is just all wrong!
Please report this error to whomever generates crap like that so that they fix their "software".
As for Sigil, I have modified Utility.cpp URLDecode and URLEncode routines to try to *un* xmlescape any hrefs before running any URL Encode or Decode on them.
That seems to do the trick in this case but that epub violates the spec clearly and probably will not work on many ebook devices! For their own sake, they should fix that crap.
People keep forgetting that these things represent actual files on actual filesystems and all of the problems and limitations that entails ... illegal characters, spaces, file paths too long, case sensitive vs case insensitive vs case insensitive but case rememebered, etc.
And they should remember that not every valid file system path is representable on another device.
Good epub devs will stick to simple, short filenames restricted to the set of characters that exist on all devices and that do not have unicode normalization issues depending on a specifc sequence to generate/build-up the character as filesystems do not all handle that the same way.
Hopefully with the lastest commits to master, the next release of Sigil will be more robust to broken opf hrefs.
Last edited by KevinH; 11-10-2019 at 11:45 AM.
|