Thread: Bug Fix 1857800
View Single Post
Old 01-08-2020, 10:40 AM   #5
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: 8,804
Karma: 6000000
Join Date: Nov 2009
Device: many
Hi Kovid,

I understand the best way to workaround this with lxml is to always add the resolve_entities=False. I can do that in lxml use in Sigil and by the _lxml builder code in BS4.

Under html5, all named entities are illegal except for the basic xml ones so no issues but error out?

But under epub2 xhtml, what is the consensus best way to handle this:

1. Do we just NOT try and resolve the Entities and allow the problem case through?

or

2. Remove the custom entity definition?

If we decide to remove the custom entity definition itself, then how do we to best deal with the entity references to that custom entity?
- Should they be removed?
- Left in place but with no definition
- Should they be replaced by a placeholder string
- Should they be disarmed by removing their & and ;

Perhaps simply wrapping the custom entity declaration in an xhtml comment is enough, letting every thing else alone?

Thanks,

KevinH
KevinH is offline   Reply With Quote