From e200230205ec1297f8d3ade3d491585f85d87fff Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Sun, 17 Jan 2016 19:15:07 +0100 Subject: 2016-01-17 18:52:00 --- tex/context/base/mkiv/lxml-tab.lua | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'tex/context/base/mkiv/lxml-tab.lua') diff --git a/tex/context/base/mkiv/lxml-tab.lua b/tex/context/base/mkiv/lxml-tab.lua index 510ba1bd4..c5480f746 100644 --- a/tex/context/base/mkiv/lxml-tab.lua +++ b/tex/context/base/mkiv/lxml-tab.lua @@ -528,7 +528,7 @@ local function handle_any_entity(str) end else if type(resolve) == "function" then - a = resolve(str) or entities[str] + a = resolve(str,entities) or entities[str] else a = entities[str] end @@ -1146,14 +1146,16 @@ local function serialize(e,handlers,...) end local function xserialize(e,handlers) - local functions = handlers.functions - local etg = e.tg - if etg then - (functions[etg] or functions["@el@"])(e,handlers) - -- elseif type(e) == "string" then - -- functions["@tx@"](e,handlers) - else - functions["@dc@"](e,handlers) + if e then + local functions = handlers.functions + local etg = e.tg + if etg then + (functions[etg] or functions["@el@"])(e,handlers) + -- elseif type(e) == "string" then + -- functions["@tx@"](e,handlers) + else + functions["@dc@"](e,handlers) + end end end -- cgit v1.2.3