-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
epub 3 validation error regarding to entity reference (this issue is also of html5 builder) #2985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Milestone
Comments
update: import re
from six.moves import html_entities
_name2codepoint4html5rgx = re.compile(r"&({});".format("|".join(
(n for n in html_entities.name2codepoint if n not in ("amp", "lt", "gt", "quot", "apos")))))
def _unescape_for_html5(s):
def _sub(m):
n = m.group(1)
#return chr(name2codepoint[n])
return "&#{};".format(html_entities.name2codepoint[n])
return _name2codepoint4html5rgx.sub(_sub, s) |
Sorry, I can't reproduce the problem. |
@hhsprings ping |
@hhsprings ping |
Unfortunately, I can't reproduce this yet. So I close this now. Thanks, |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Uh oh!
There was an error while loading. Please reload this page.
For now, EpubCheck 4.0.1 complains sphinx epub(3) builder's output is invalid for entity references (even if PR#2805 was applied):
Currently, in the sphinx code tree, there are many embeded entity references (in locales and themes), so, we can take two approaches:
Latter approach can be reached using
htmlentityrefs
of standard python library, for example, like this:The text was updated successfully, but these errors were encountered: