From fe4b1adb3baadc14f8bb38b463328cb49bd84ca0 Mon Sep 17 00:00:00 2001 From: lxsang Date: Sat, 6 Jun 2020 14:15:25 +0200 Subject: [PATCH] bug fix: escape pattern before searching and replace --- os/libs/vfs.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/libs/vfs.lua b/os/libs/vfs.lua index bb1f581..f3793c1 100644 --- a/os/libs/vfs.lua +++ b/os/libs/vfs.lua @@ -115,7 +115,7 @@ vfs.write = function(path,data) if data ~= "" then local header = string.match(data, "^data%:[%w%.-]+%/[%w%.-]+;base64,") if header ~= nil then - local b64data = string.gsub(data, header,"") + local b64data = string.gsub(data, utils.escape_pattern(header),"") local barr = std.b64decode(b64data) bytes.write(barr,osfile) --[[ if std.isBinary(osfile) then