From 510b307c38933e773e9d4885023a4595b978eb33 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 7 Nov 2020 22:02:51 +0000 Subject: tex4ebook (7nov20) git-svn-id: svn://tug.org/texlive/trunk@56876 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/tex4ebook/tex4ebook-exec_epub.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Master/texmf-dist/scripts/tex4ebook/tex4ebook-exec_epub.lua') diff --git a/Master/texmf-dist/scripts/tex4ebook/tex4ebook-exec_epub.lua b/Master/texmf-dist/scripts/tex4ebook/tex4ebook-exec_epub.lua index b0ccee62027..75304e24942 100755 --- a/Master/texmf-dist/scripts/tex4ebook/tex4ebook-exec_epub.lua +++ b/Master/texmf-dist/scripts/tex4ebook/tex4ebook-exec_epub.lua @@ -393,12 +393,13 @@ local function fix_ncx_toc_levels(dom) return dom end -local function clean_xml_files() +function clean_xml_files() local opf_file = outputdir .. "/content.opf" update_file(opf_file, function(content) -- remove wrong elements from the OPF file -- open opf file and create LuaXML DOM - local opf_dom = dom.parse(content) + -- the second argument to dom.parse is needed to avoid parsing issues due to the element. + local opf_dom = dom.parse(content, {}) -- remove child elements from elements that don't allow them for _, el in ipairs(opf_dom:query_selector("dc|title, dc|creator")) do -- get text content -- cgit v1.2.3