summaryrefslogtreecommitdiffhomepage
path: root/libs/core/luasrc
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-08-15 20:42:25 +0000
committerSteven Barth <steven@midlink.org>2008-08-15 20:42:25 +0000
commit8e4afe121087c05833ee7d567fe45f2ba270e54d (patch)
tree20d64661cd0c2bb67b2e440886ae3bae55b31f07 /libs/core/luasrc
parent1d4196b3ff1bceaa858ffbee637bf212d5b5d428 (diff)
Several escaping fixes
Updated XML translation system Use the new Table widget for DHCP leases
Diffstat (limited to 'libs/core/luasrc')
-rw-r--r--libs/core/luasrc/util.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/core/luasrc/util.lua b/libs/core/luasrc/util.lua
index 51d66e08e5..ef1b8fe279 100644
--- a/libs/core/luasrc/util.lua
+++ b/libs/core/luasrc/util.lua
@@ -199,6 +199,8 @@ end
-- @param value String value containing the data to escape
-- @return String value containing the escaped data
function pcdata(value)
+ if not value then return end
+ value = tostring(value)
value = value:gsub("&", "&amp;")
value = value:gsub('"', "&quot;")
value = value:gsub("'", "&apos;")