aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorFlorian Zeitz <florob@babelmonkeys.de>2012-06-12 18:29:58 +0200
committerFlorian Zeitz <florob@babelmonkeys.de>2012-06-12 18:29:58 +0200
commite75bdcefeef9a591b20d68bf8da18913b9117e6e (patch)
treed65366d2bfb5a905827e1962127cb4428e4fa3b2 /util
parent67cafcb874bf19db469dea76b7e2baf597009c89 (diff)
downloadprosody-e75bdcefeef9a591b20d68bf8da18913b9117e6e.tar.gz
prosody-e75bdcefeef9a591b20d68bf8da18913b9117e6e.zip
util.dataforms: Fix parsing of -multi fields
Diffstat (limited to 'util')
-rw-r--r--util/dataforms.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/dataforms.lua b/util/dataforms.lua
index 8cb39144..55bad998 100644
--- a/util/dataforms.lua
+++ b/util/dataforms.lua
@@ -185,7 +185,7 @@ field_readers["list-multi"] =
function (field_tag, required)
local result = {};
for value in field_tag:childtags("value") do
- result[#result+1] = value;
+ result[#result+1] = value:get_text();
end
return result, (required and #result == 0 and "Required value missing" or nil);
end
@@ -202,10 +202,10 @@ field_readers["text-multi"] =
field_readers["list-single"] =
field_readers["text-single"];
- local boolean_values = {
- ["1"] = true, ["true"] = true,
- ["0"] = false, ["false"] = false,
- };
+local boolean_values = {
+ ["1"] = true, ["true"] = true,
+ ["0"] = false, ["false"] = false,
+};
field_readers["boolean"] =
function (field_tag, required)