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
|