Signed-off-by: Anna Tikhomirova <vamp@vampik.ru>
http.setfilehandler(
function(meta, chunk, eof)
- local data = util.trim(chunk:gsub("\r\n", "\n")) .. "\n"
- data = util.trim(data:gsub("[\128-\255]", ""))
+ local data = chunk:gsub("\r\n", "\n")
if not fp and meta and meta.name == "ovpn_file" then
fp = io.open(file, "w")
end
function file.write(self, section, data1)
- return fs.writefile(cfg_file, "\n" .. util.trim(data1:gsub("\r\n", "\n")) .. "\n")
+ return fs.writefile(cfg_file, util.trim(data1:gsub("\r\n", "\n")) .. "\n")
end
function file.remove(self, section, value)