From 0548b61bf183ce593a6c652bca835d03608c8d9f Mon Sep 17 00:00:00 2001 From: Laurent Le Meur Date: Tue, 28 Oct 2025 14:58:05 +0100 Subject: [PATCH] Fix Page map encryption. --- epub/epub.go | 3 ++- epub/reader.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/epub/epub.go b/epub/epub.go index 6d2c267f3..585e8be27 100644 --- a/epub/epub.go +++ b/epub/epub.go @@ -23,7 +23,8 @@ const ( ContentType_XHTML = "application/xhtml+xml" ContentType_HTML = "text/html" - ContentType_NCX = "application/x-dtbncx+xml" + ContentType_NCX = "application/x-dtbncx+xml" + ContentType_PAGEMAP = "application/oebps-page-map+xml" ContentType_EPUB = "application/epub+zip" ) diff --git a/epub/reader.go b/epub/reader.go index 15ef4aee1..931114233 100644 --- a/epub/reader.go +++ b/epub/reader.go @@ -179,7 +179,8 @@ func addCleartextResources(ep *Epub, p opf.Package) { if strings.Contains(item.Properties, "cover-image") || item.ID == coverImageID || strings.Contains(item.Properties, "nav") || - item.MediaType == ContentType_NCX { + item.MediaType == ContentType_NCX || + item.MediaType == ContentType_PAGEMAP { // re-construct a path, avoid insertion of backslashes as separator on Windows path := filepath.ToSlash(filepath.Join(p.BasePath, item.Href)) ep.addCleartextResource(path)