diff options
author | Kim Alvefur <zash@zash.se> | 2020-12-24 17:57:28 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-12-24 17:57:28 +0100 |
commit | d6918df73ab0a487950d265b1bc9be4e495a248c (patch) | |
tree | 8395eea9e0475b399a732dcf27a920bda398fa57 | |
parent | c48e0ea351ea38188cfb47c8c760e6a76d1545ea (diff) | |
download | prosody-d6918df73ab0a487950d265b1bc9be4e495a248c.tar.gz prosody-d6918df73ab0a487950d265b1bc9be4e495a248c.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)
-rw-r--r-- | util/stanza.lua | 4 |
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 |