From b8018c0ac15e4ff48acef03c88dd51ba052d2123 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 20 Jul 2020 21:20:09 +0000 Subject: luaxml (20jul20) git-svn-id: svn://tug.org/texlive/trunk@55891 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua | 7 ++++++- Master/texmf-dist/tex/luatex/luaxml/luaxml-namedentities.lua | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'Master/texmf-dist/tex/luatex/luaxml') diff --git a/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua b/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua index 413947b5d4c..6d299d41575 100644 --- a/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua +++ b/Master/texmf-dist/tex/luatex/luaxml/luaxml-domobject.lua @@ -115,7 +115,12 @@ local function serialize_dom(parser, current,level, output) attributes["_text"] = nil elseif xtype == "DECL" and name =="xml" then -- the xml declaration attributes must be in a correct order - insert("", attributes.version, attributes.encoding) + local encoding = attributes.encoding or "utf-8" + insert("", attributes.version, encoding) + return output + elseif xtype == "CDATA" then + -- return content unescaped + insert(string.format("", text_content)) return output end diff --git a/Master/texmf-dist/tex/luatex/luaxml/luaxml-namedentities.lua b/Master/texmf-dist/tex/luatex/luaxml/luaxml-namedentities.lua index dbbed79ce0b..9a26f448f67 100644 --- a/Master/texmf-dist/tex/luatex/luaxml/luaxml-namedentities.lua +++ b/Master/texmf-dist/tex/luatex/luaxml/luaxml-namedentities.lua @@ -1,3 +1,4 @@ +local utf8 = require "utf8" return { ["Subset"]="⋐", ["Chi"]="Χ", @@ -39,7 +40,7 @@ return { ["nsqsube"]="⋢", ["Nacute"]="Ń", ["mcomma"]="⨩", -["ApplyFunction"]="⁡", +["ApplyFunction"]=utf8.char(8289), ["rfisht"]="⥽", ["phmmat"]="ℳ", ["rarrw"]="↝", -- cgit v1.2.3