util/stanza.lua
branch0.11
changeset 11265 be38ae8fdfa5
parent 11209 9d1e21c23784
child 11268 2cdcf55c6dd5
child 12801 be09ac8300a7
--- a/util/stanza.lua	Wed Dec 16 08:50:20 2020 +0100
+++ b/util/stanza.lua	Thu Dec 24 17:57:28 2020 +0100
@@ -66,9 +66,9 @@
 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