![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: May 2017
Device: Kindle Paperwhite
|
![]()
I use the character & in several places through my book, e.g. S&P 500.
When I first had it simply as the standalone &, I would get an error in the preview window pointing out that & is an escape code and should be followed by other characters or a # and then numbers. So I replaced it with & which is the HTML named code for that character. However, when I save the file, "&" is replaced by "&" I tried using "& # 38;" (without the spaces) instead, but on saving, it's replaced by "&" Subsequent saves just make the chain that much longer. Both & and & # 38;(without the spaces) are in my list of entities to preserve, along with various quotes, dashes, and ellipses. None of those others are affected. Only the ampersand is getting messed with. I'm running 0.9.8. Is anyone else seeing this problem? Is there a workaround? |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,880
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Have you tried using the special character tool (the omega)
typing IN CODE VIEW Code:
& also 0.9.8 W10 x64 |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: May 2017
Device: Kindle Paperwhite
|
I am using & in the code view, which is what the Omega tool gives me.
However, when the "mend HTML" option is checked during save or open, it's expanding it into nonsense like: Code:
& Code:
& I did find the workaround by turning off the HTML mending option on save/open, but this makes me think there's a bug in that code. None of the other special characters like — were altered. |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,338
Karma: 203719142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Remove the & and & from your Preserve Entities preferences. Sigil can deal with ampersands inherently. Also remember to turn your "Mend on Save/Open" back on.
Adding Preserve Entities entries for: & / & < / < > / > is unnecessary and will only serve to confuse/break things (as you've discovered). Those three entities are handled inherently/internally. Last edited by DiapDealer; 05-14-2017 at 07:03 AM. |
![]() |
![]() |
![]() |
#5 | |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: May 2017
Device: Kindle Paperwhite
|
Except that it's *not* handling &'s natively. When I put one in the middle of a sentence, the preview window and book view give me this error:
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: May 2017
Device: Kindle Paperwhite
|
Wait, I think I see what you're saying. Once I removed & from the preserve entities, then & was fine in the text, not being altered by save/load/etc.
Last edited by DanThompson; 05-14-2017 at 03:25 PM. Reason: typo |
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,338
Karma: 203719142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Yes. Adding any of the ampersand or < or > entities to the Preserve Entities list is going to cause problems. I'll look into getting those specific ones ignored if they happen to get added to the Preserve Entities list.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
ampersand (&) in tags | Alex II | Calibre | 6 | 01-16-2016 06:02 AM |
Vitrual Lib-Names with ampersand at Content Server | Divingduck | Calibre | 3 | 02-28-2014 03:10 AM |
Title problems with 'with' and 'and' being changed to ampersand | rwmcafee | Calibre | 4 | 06-25-2012 09:05 AM |
Ampersand missing from cover flow window | PatNY | Calibre | 11 | 12-07-2011 02:36 PM |
Ampersand Issue with downloaded metedata | danwdoo | Calibre | 5 | 03-25-2009 10:29 PM |