diff options
author | Hans Hagen <pragma@wxs.nl> | 2010-04-16 21:08:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2010-04-16 21:08:00 +0200 |
commit | 5d4880ac91b0e605b3392d15dd7572489b92333e (patch) | |
tree | 8e0a6ef300fcee6646de8967f1d504a566026f4f /tex/context/base/lxml-tab.lua | |
parent | f23cb4ae64dc24ea24aaa2d1fdf049756063cfff (diff) | |
download | context-5d4880ac91b0e605b3392d15dd7572489b92333e.tar.gz |
beta 2010.04.16 21:08
Diffstat (limited to 'tex/context/base/lxml-tab.lua')
-rw-r--r-- | tex/context/base/lxml-tab.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tex/context/base/lxml-tab.lua b/tex/context/base/lxml-tab.lua index b13e2a4ac..08466665e 100644 --- a/tex/context/base/lxml-tab.lua +++ b/tex/context/base/lxml-tab.lua @@ -145,7 +145,7 @@ element.</p> local nsremap, resolvens = xml.xmlns, xml.resolvens local stack, top, dt, at, xmlns, errorstr, entities = { }, { }, { }, { }, { }, nil, { } -local strip, cleanup, utfize, resolve, keep = false, false, false, false, false +local strip, cleanup, utfize, resolve, resolve_predefined = false, false, false, false, false local dcache, hcache, acache = { }, { }, { } local mt = { } @@ -349,7 +349,7 @@ xml.parsedentitylpeg = parsedentity local predefined = { amp = "&", lt = "<", - gt = "<", + gt = ">", quot = '"', apos = "'", } @@ -358,7 +358,7 @@ local function handle_any_entity(str) if resolve then local a = acache[str] -- per instance ! todo if not a then - a = not keep and predefined[str] + a = resolve_predefined and predefined[str] if a then -- one of the predefined elseif type(resolve) == "function" then @@ -404,7 +404,7 @@ local function handle_any_entity(str) if trace_entities then logs.report("xml","found entity &%s;",str) end - a = not keep and predefined[str] + a = resolve_predefined and predefined[str] if a then -- one of the predefined acache[str] = a @@ -553,7 +553,7 @@ local function xmlconvert(data, settings) strip = settings.strip_cm_and_dt utfize = settings.utfize_entities resolve = settings.resolve_entities - keep = settings.keep_predefined_entities + resolve_predefined = settings.resolve_predefined_entities -- in case we have escaped entities cleanup = settings.text_cleanup stack, top, at, xmlns, errorstr, result, entities = { }, { }, { }, { }, nil, nil, settings.entities or { } acache, hcache, dcache = { }, { }, { } -- not stored |