1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-12-26 01:18:21 +01:00

bug fix: escape pattern before searching and replace

This commit is contained in:
lxsang 2020-06-06 14:15:25 +02:00
parent 9c049a83b3
commit fe4b1adb3b

View File

@ -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