![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,581
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
A bug in Sigil?
Hi Kevin and Diap;
In my epubs (3), sometimes I add a javascript to the nav.xhtml file and when I do that, the property "scripted" is not added in the .opf file. That is not a big problem because I can add that property by hand (and I do that), but the issue arises when Sigil open the epub because the property added by me, is erased; I have to do the thing every time that Sigil opens the ebook. Could you fix that in the next Sigil version? Many thanks in advance. |
![]() |
![]() |
![]() |
#2 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38,434
Karma: 152905840
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
If you use the ePub3 Tools item in the Tools menu and click on Update Manifest Properties, does this correct the error(s) for you. I haven't tried it with a js linked to the nav document, but it works for standard html documents though I seem to recall at one point, reading that what the navigation document can contain is limited and javascript was not listed as a allowed item. Now if I could find that reference...
Edit: The reference basically stated that since the navigation document is intended to be machine readable, javascript should not be used. Instead make the navigation document hidden and create an dedicated for human use html ToC. So perhaps a nav.xhtml navigation document and a toc.xhtml human intended ToC. Last edited by DNSB; 07-14-2024 at 02:21 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,925
Karma: 5449552
Join Date: Nov 2009
Device: many
|
I will look into it. That property should not be erased if present on loading of any epub if it already exists in the opf manifest for any file.
|
![]() |
![]() |
![]() |
#4 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,925
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Yes the SetNavResource() in the OPFResouce is the issue as it just assigns the nav overwriting any other properties.
Also the Epub3 Update Manifest Properties Tool needs to be allowed to work on the nav. I will try to get a fix for both done soon. |
![]() |
![]() |
![]() |
#5 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,581
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38,434
Karma: 152905840
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I'm not disagreeing that allowing the scripted property for the nav document is not prohibited. What I got from the article I read and made a couple of notes from is that the authors did not recommend using javascript in the nav document since it could cause issues with the renderer's ability to parse the file. Their suggested workaround was a vanilla navigation document that was hidden and a ToC file that could be fancified without needing to worry about the renderer parsing it.
|
![]() |
![]() |
![]() |
#7 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,581
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Last edited by RbnJrg; 07-15-2024 at 12:22 AM. |
|
![]() |
![]() |
![]() |
#8 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38,434
Karma: 152905840
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#9 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,925
Karma: 5449552
Join Date: Nov 2009
Device: many
|
This should now be fixed in master.
Thank you for your bug report! |
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,581
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
A new bug in Sigil 0.9.12? | RbnJrg | Sigil | 6 | 03-07-2019 07:20 AM |
Bug in Sigil 0.9.5 | PKTC | Sigil | 6 | 04-05-2016 12:33 PM |
Possible Bug in Sigil 0.8.7 | dragon reader | Sigil | 34 | 11-19-2015 11:45 AM |
possible h1 bug in Sigil 0.6.1? | michaelbr | Sigil | 2 | 12-04-2012 07:56 PM |