aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-12-24 17:57:28 +0100
committerKim Alvefur <zash@zash.se>2020-12-24 17:57:28 +0100
commit24e57b75900452b4172d666e9eee3592265cfcd6 (patch)
tree8395eea9e0475b399a732dcf27a920bda398fa57 /util
parenta0b5b349a60d8bd89162d26437e025f7a47300a0 (diff)
downloadprosody-24e57b75900452b4172d666e9eee3592265cfcd6.tar.gz
prosody-24e57b75900452b4172d666e9eee3592265cfcd6.zip
util.stanza: Move misplaced argument to correct place
valid_utf8() takes only one argument, so the false was probably meant to be valid_xml_cdata(text, attribute=false)
Diffstat (limited to 'util')
-rw-r--r--util/stanza.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/stanza.lua b/util/stanza.lua
index cf2818ec..a8c619d0 100644
--- a/util/stanza.lua
+++ b/util/stanza.lua
@@ -66,9 +66,9 @@ end
local function check_text(text, text_type)
if type(text) ~= "string" then
error("invalid "..text_type.." value: expected string, got "..type(text));
- elseif not valid_xml_cdata(text) then
+ elseif not valid_xml_cdata(text, false) then
error("invalid "..text_type.." value: contains control characters");
- elseif not valid_utf8(text, false) then
+ elseif not valid_utf8(text) then
error("invalid "..text_type.." value: contains invalid utf8");
end
end