Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 11-14-2026, 11:40 AM   #16
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,952
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by JSWolf View Post
It is actually  . I tested posting an actual non-breaking space and the forum converted it to an *.
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.
DiapDealer is online now   Reply With Quote
Old 11-14-2026, 02:47 PM   #17
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 10,229
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>
[Again the above without the space after the ampersand].

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; 11-14-2026 at 02:58 PM.
KevinH is online now   Reply With Quote
Old 11-14-2026, 02:55 PM   #18
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,952
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).
DiapDealer is online now   Reply With Quote
Old Yesterday, 07:37 AM   #19
jd1004
Member
jd1004 began at the beginning.
 
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".
Attached Thumbnails
Click image for larger version

Name:	01.jpg
Views:	12
Size:	10.5 KB
ID:	227397   Click image for larger version

Name:	02.jpg
Views:	14
Size:	23.2 KB
ID:	227398   Click image for larger version

Name:	03.jpg
Views:	12
Size:	23.6 KB
ID:	227399  
jd1004 is offline   Reply With Quote
Old Yesterday, 09:06 AM   #20
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,952
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I have confirmed this behavior on Linux. I DO have &#160; in my preserve entities list.
DiapDealer is online now   Reply With Quote
Old Yesterday, 09:28 AM   #21
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 10,229
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; Yesterday at 09:31 AM.
KevinH is online now   Reply With Quote
Old Yesterday, 09:52 AM   #22
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,952
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; Yesterday at 10:44 AM.
DiapDealer is online now   Reply With Quote
Old Yesterday, 01:02 PM   #23
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 10,229
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.
KevinH is online now   Reply With Quote
Old Yesterday, 01:06 PM   #24
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,952
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I'm trying to nail it down to a shorter recreation process.
DiapDealer is online now   Reply With Quote
Old Yesterday, 01:22 PM   #25
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 10,229
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; Yesterday at 01:25 PM.
KevinH is online now   Reply With Quote
Old Yesterday, 04:57 PM   #26
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 10,229
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. Plus it did not exempt all 5 basic xml named entities.

So I have modified that code so that numeric entities are left alone as are the basic legal xml named entities such as quot, amp, apos, lt, and gt

I have pushed this to Sigil master.

The faster way to test this is:

1. open any epub2 and add & #160; (without the space after the &) in any text value entry

or

open any epub3 and edit the nav to add & #160; (without the space after the &) in any nav text entry and then delete and recreate the NCX using the epub3 tools

2. Right click in BookBrowser on the ncx and select Move to move it either up or down one directory level

That is enough to cause SourceUpdates to be called on the ncx which in turn invokes sigil_bs4/elment.py in decodexml_contents which is what has the bug.

This code stems from the epub2 only timeframe and changed the leading & of *named* entities which are illegal in pure xml like the ncx by converting the leading & to & amp; thereby disabling them.

When epub3 came along and numeric entities became all the rage and named entities became illegal, we did not modify the code in sigil_bs4/element.py to properly allow numeric entities through untouched.

I have just pushed the code to master to fix this.

Thank you for the bug report.

ps. Restructure to Sigil Norm simply was a complex way of invoking SourceUpdates on an ncx.

Last edited by KevinH; Yesterday at 05:52 PM.
KevinH is online now   Reply With Quote
Old Yesterday, 05:45 PM   #27
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,952
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
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.
This definitely triggered the issue for me.
DiapDealer is online now   Reply With Quote
Old Yesterday, 05:54 PM   #28
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 10,229
Karma: 7640012
Join Date: Nov 2009
Device: many
We should be good now with:

https://github.com/Sigil-Ebook/Sigil...c33249f42e915a
KevinH is online now   Reply With Quote
Old Yesterday, 06:29 PM   #29
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 55,854
Karma: 182814390
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
A build with this code added is now downloadable from the link in Downloading Sigil test builds for Windows.
DNSB is offline   Reply With Quote
Old Today, 03:53 AM   #30
philja
Evangelist
philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!
 
Posts: 457
Karma: 100100
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
Frankly, I find the discussion of entity preservation puzzling. I've never understood what Sigil's Preserve Entities preference does and the User Guide doesn't help.

The User Guide mixes up the use of 'numerical entities', 'named entities' and 'Unicode characters' to the point where it is difficult to understand which to use.

It is clear that epub3 prefers using numerical entities because xhtml cannot handle many of the named entities.

The User Guide says:

Code:
To preserve specific entities and prevent Mend from converting them to Unicode characters, click Add, and add them to the Entities to Preserve list.
Searches on internet would seem to imply that the term 'Unicode Character' includes both versions: named entities and numerical entities.

So, does having "& #160;" (without the space) in Sigil's preserve entities list mean that it will not be converted to a named entity?
philja is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 08:55 AM.


MobileRead.com is a privately owned, operated and funded community.