|
|
#46 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,963
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I kind of figured the Preserve Entities list would have no bearing on the ncx. But the preservation of the numerical, non-breaking space entity gave me pause. It must be special-cased somewhere, somehow.
|
|
|
|
|
|
#47 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,264
Karma: 7640672
Join Date: Nov 2009
Device: many
|
It is.
Here is the list of chars to special case from dammit.py in sigil_bs4: Code:
CHARACTER_TO_XML_ENTITY = {
"'": "apos",
'"': "quot",
"&": "amp",
"<": "lt",
">": "gt",
"\u00a0" : "#160",
}
|
|
|
|
|
|
#48 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,264
Karma: 7640672
Join Date: Nov 2009
Device: many
|
So that explains the difference in behaviour. I do not think Sigil needs to worry about Preserving Entities in pure xml (ie. the NCX or OPF). We converted to decoding entities to actual chars in lxml to fix metadata parsing issue back in 2020, and I do not want to reopen that kettle of fish.
Now if the same thing happens in index xhtml files then that is a bug to fix. |
|
|
|
|
|
#49 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,963
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Agreed.
|
|
|
|
|
|
#50 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,096
Karma: 4000789
Join Date: Jan 2017
Location: Poland
Device: Various
|
Exactly. I played around with it for a while and don't see any problem with the entities in the XML files being converted to unicode characters. Anyway, I guess it's always been that way.
|
|
|
|
![]() |
|
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 |