diff options
| author | Albert Krewinkel <[email protected]> | 2024-02-20 20:39:43 +0100 |
|---|---|---|
| committer | Albert Krewinkel <[email protected]> | 2024-02-20 21:10:15 +0100 |
| commit | 5c6a8eb60799fa142640d5f64b8f312db85d5ea9 (patch) | |
| tree | 0cb90012adb245e6a67baa84ade2387f01590b89 /pandoc-lua-engine/src | |
| parent | 37668ba37888ec11f0d3604a4508b42f7190d9b3 (diff) | |
Lua: avoid crashing when an error message is not valid UTF-8
Invalid input bytes in error messages caused pandoc to crash with an
encoding exception. Instead, the invalid bytes are now replaced with the
Unicode replacement character U+FFFD.
Diffstat (limited to 'pandoc-lua-engine/src')
| -rw-r--r-- | pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/PandocError.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/PandocError.hs b/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/PandocError.hs index 30389366c..f6d9d6e43 100644 --- a/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/PandocError.hs +++ b/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/PandocError.hs @@ -23,7 +23,7 @@ import HsLua.Packaging import Text.Pandoc.Error (PandocError (PandocLuaError), renderError) import qualified HsLua as Lua -import qualified Text.Pandoc.UTF8 as UTF8 +import qualified HsLua.Core.Utf8 as UTF8 -- | Lua userdata type definition for PandocError. typePandocError :: LuaError e => DocumentedType e PandocError |
