|
|
#16 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,948
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
That's exactly what I was NOT saying Jon. I KNOW Mobileread will butcher entities. What I am trying to determine (and you are interfering with) is whether it was Sigil that was butchering that particular entity. Which would be a bug. Please, please, please stop interfering when I am in the process of debugging something. You always tend to introduce unhelpful noise whenever you do.
|
|
|
|
|
|
#17 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,227
Karma: 7640012
Join Date: Nov 2009
Device: many
|
And I can not recreate it in Sigil.
When I add and & #160; (without the space after the ampersand) to a nav entry and then tell it to generate an ncx, I get the following: Code:
<navPoint id="navPoint4">
<navLabel>
<text>Chapter 2: The Pool & #160; of Tears</text>
</navLabel>
<content src="Chapter-02.xhtml" />
</navPoint>
That is exactly correct. Then I replaced the nbsp in the nav with the actual nbsp char then recreated the ncx from it and ( if Preserve Entities has that nbsp included) you get the correct entity in the ncx. Next I replaced the nbsp in the nav with the actual nbsp char, then changed the Preserve Entities to *not* preserve the nbsp, and then recreated the ncx, it was generated with the correct nbsp character (no entity). So no bug here at all. This is working exactly as designed. Last edited by KevinH; Yesterday at 02:58 PM. |
|
|
|
|
|
#18 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,948
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Sounds good. I can't reproduce it either. So we'll assume that's the same thing the OP is seeing, and that Mobileread is just butchering what they pasted in (as usual).
|
|
|
|
|
|
#19 |
|
Member
![]() Posts: 15
Karma: 10
Join Date: Nov 2025
Device: none
|
Hi guys
I can reproduce the error with Sigil 2.8.6 on Windows 10. But you have to follow steps 1) to 4) exactly as described. It starts with image "01" in the NAV. Then after step 3) you get image "02" ... all is still OK. But after step 4) you get image "03". |
|
|
|
|
|
#20 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,948
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I have confirmed this behavior on Linux. I DO have   in my preserve entities list.
|
|
|
|
|
|
#21 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,227
Karma: 7640012
Join Date: Nov 2009
Device: many
|
So something in SourceUpdates when updating links in the NCX or in the Nav is most probably generating that error. I will look into it. As NCX generation with correct Nav works just fine.
Last edited by KevinH; Today at 09:31 AM. |
|
|
|
|
|
#22 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,948
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
It is not until step four that the entity in the ncx gets borked. Is the non-breaking space decimal entity not valid in the nav or ncx document? By my thinking, everything in the nav/ncx is valid when the final Restructure to Sigil Norm is run. But I could be wrong.
Last edited by DiapDealer; Today at 10:44 AM. |
|
|
|
|
|
#23 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,227
Karma: 7640012
Join Date: Nov 2009
Device: many
|
In xml, numeric entities are always valid even without a special namespace added as is done in epub2 xhtml for named entities.
So it is something in SourceUpdates that updates links in the ncx or parses the ncx that is probably the issue. |
|
|
|
|
|
#24 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,948
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm trying to nail it down to a shorter recreation process.
|
|
|
|
|
|
#25 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,227
Karma: 7640012
Join Date: Nov 2009
Device: many
|
https://github.com/Sigil-Ebook/Sigil...ement.py#L1341
I think the bug is in this routine as it does not handle other entities. So to test that. Start with an epub2 with ncx 1. Put numeric non-breaking space entity in one of the text fields of the ncx 2. Use Sigil BookBrowser Move to move the ncx to some other folder. That should run the SourceUpdates on that NCX that in turn parses the ncx with sigil_bs4 to update links, then decode it back to xml which hits the routine above. All of the above is a guess, all I have access to at the moment is an ipad. Last edited by KevinH; Today at 01:25 PM. |
|
|
|
|
|
#26 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,227
Karma: 7640012
Join Date: Nov 2009
Device: many
|
I think that snippet of code was meant to disable all non-primary named entities, but it also hits valid numeric entities and disables them as well.
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| No Table of Contents and "This HTML file is larger than 260 KB" Error | rosewood | Conversion | 13 | 02-07-2023 12:58 PM |
| PRS-T3 "Table of contents" button on every page | Leon74 | Sony Reader | 2 | 01-04-2014 12:48 PM |
| Change name of autogenerated "Table of Contents" | Dzoni | Conversion | 7 | 03-16-2011 04:44 AM |
| Generating a rough "table of contents" | Vanguard3000 | Calibre | 5 | 01-09-2011 11:31 PM |
| TOO SLOW to open "Table of Contents" | mdhuang | Sony Reader | 16 | 09-06-2007 11:29 PM |