Added minimal json encoding function

Modified bash path in ntopng-add-user.sh
This commit is contained in:
Luca Deri 2016-08-05 11:03:56 +02:00
parent 4b9a3744a4
commit 89d6fa301a
2 changed files with 13 additions and 1 deletions

View file

@ -2128,6 +2128,16 @@ end
-- ###############################################
-- TODO: improve this function
function jsonencode(what)
what = string.gsub(what, '"', "'")
what = string.gsub(what, "\n", " ")
what = string.gsub(what, "\r", " ")
return(what)
end
-- ###############################################
function formatWebSite(site)
return("<A target=\"_blank\" HREF=http://"..site..">"..site.."</A> <i class=\"fa fa-external-link\"></i></th>")
end