summaryrefslogtreecommitdiff
path: root/tex/context/base/lpdf-epd.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/lpdf-epd.lua')
-rw-r--r--tex/context/base/lpdf-epd.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/tex/context/base/lpdf-epd.lua b/tex/context/base/lpdf-epd.lua
index 3e917dba2..76d258cef 100644
--- a/tex/context/base/lpdf-epd.lua
+++ b/tex/context/base/lpdf-epd.lua
@@ -27,6 +27,22 @@ local lower, match, char, find, sub = string.lower, string.match, string.char, s
local concat = table.concat
local toutf = string.toutf
+-- a bit of protection
+
+local limited = false
+
+directives.register("system.inputmode", function(v)
+ if not limited then
+ local i_limiter = io.i_limiter(v)
+ if i_limiter then
+ epdf.open = i_limiter.protect(epdf.open)
+ limited = true
+ end
+ end
+end)
+
+--
+
function epdf.type(o)
local t = lower(match(tostring(o),"[^ :]+"))
return t or "?"