From 24e57b75900452b4172d666e9eee3592265cfcd6 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 24 Dec 2020 17:57:28 +0100 Subject: 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) --- util/stanza.lua | 4 ++-- 1 file 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 -- cgit v1.2.3