From b122dab1b0464e35a6a095d82a4139f6700bb29f Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Wed, 23 Oct 2024 16:38:36 +0300 Subject: [PATCH] chore(core): Limit side-loaded content to text only when not expecting binary --- packages/tableofcontents/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tableofcontents/init.lua b/packages/tableofcontents/init.lua index a92d63d02..d2e6bef1f 100644 --- a/packages/tableofcontents/init.lua +++ b/packages/tableofcontents/init.lua @@ -44,7 +44,7 @@ function package.readToc (_) return false -- No TOC yet end local doc = tocfile:read("*all") - local toc = assert(load(doc), tocfile_name)() + local toc = assert(load(doc), tocfile_name, "r")() SILE.scratch._tableofcontents = toc return SILE.scratch._tableofcontents end