diff --git a/data/filters/prepare-affiliations.lua b/data/filters/prepare-affiliations.lua index ea657d4..0871b71 100644 --- a/data/filters/prepare-affiliations.lua +++ b/data/filters/prepare-affiliations.lua @@ -10,10 +10,14 @@ local function prepare_affiliations (meta) for i, affiliation_index in ipairs(author.affiliation) do affiliation_index = tonumber(pandoc.utils.stringify(affiliation_index)) local affiliation = meta.affiliations[affiliation_index] + local function html_escape(str) + local doc = pandoc.Pandoc{pandoc.Str(str)} + return pandoc.write(doc, 'html') + end xml = xml.. "\n " for _, v in ipairs(affiliation.name) do if v.text then - xml = xml .. v.text + xml = xml .. html_escape(v.text) else xml = xml .. " " end