Open clach04 opened 1 year ago
Test case:
# demo for https://github.com/wcember/pypub
import pypub
my_first_epub = pypub.Epub('mdash_demo')
my_first_chapter = pypub.create_chapter_from_string(u'<p>Hello\u2014World</p>', title='mdash Chapter')
my_first_epub.add_chapter(my_first_chapter)
my_first_epub.create_epub('OUTPUT_DIRECTORY')
Possibly another manifestation of https://github.com/wcember/pypub/issues/18 ?
(py27venv) C:\code\py\pypub\pypub>java -jar C:\Programs\epubcheck-5.1.0\epubcheck.jar OUTPUT_DIRECTORY\mdashdemo.epub
Validating using EPUB version 2.0.1 rules.
FATAL(RSC-016): OUTPUT_DIRECTORY/mdashdemo.epub/OEBPS/ch000.xhtml(9,16): Fatal Error while parsing file: The entity "mdash" was referenced, but not declared.
Check finished with errors
Messages: 1 fatal / 0 errors / 0 warnings / 0 infos
EPUBCheck completed
Get fatal errors. Should map:
&mdash
to—
-u'\u2014'
Found in issue #24
This is enough to cause truncation and unexpected behaviors in Adobe Digital Editions Version 4.5.11.187303