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
commit7f7ec9e1ed494832de1626a120ebc293ce3e1313 (patch)
tree8395eea9e0475b399a732dcf27a920bda398fa57 /util
parentdb3c36c69df77eee32cc8e4d1e036d3309fc58dd (diff)
downloadprosody-7f7ec9e1ed494832de1626a120ebc293ce3e1313.tar.gz
prosody-7f7ec9e1ed494832de1626a120ebc293ce3e1313.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