Closed ClaasJG closed 3 years ago
Interesting, I'm kind of surprised that it's taken so long for this to turn up as an issue.
Good evening,
thanks for the fix. I don't know if you expected me to close this issue or if you left it open as remainder that invalid content html is still a problem. I consider my problem fixed and this issue resolved and just assume I may close it.
Have a nice day
-ClaasJG
Sure, go for it. I was leaving it open as a reminder to myself that I should make the template HTML more robust, but making a dedicated ticket for that would be a more-correct action. :D
Hello,
I could not open the chapter Interlude: Lost & Found of 'A Practical Guide to Evil' Book 6 using a Toline Shine 3 (This is also reproducible using the chrome Extension EPUBReader) because, it contains invalid html. I am using leech and the example json from d50f23d07b854d8dfd50a0a1de92bf051c275a1b .
The title of the chapter contains a '&' symbol. This 'stray ambiguous ampersand' is the cause for the error and should be replaced with
&
. See the following html taken from the downloaded ePub:I tried to fix this by escaping the title using html.escape at ebook_init_.py # chapter_html @ Line 93.
I do not generally escape the chapter title, because otherwise it will be displayed as
Interlude: Lost & Found
in the index.This quick and dirty fix allows the Toline Shine 3 to display the chapter, Be aware, that a stray '&' withing the content would produces a similar error.
Thanks for leech and have a nice day
-ClaasJG