Software /
code /
prosody
Changeset
11261:be38ae8fdfa5 0.11
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)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 24 Dec 2020 17:57:28 +0100 |
parents | 11237:49aeae836ad1 |
children | 11262:2c559953ad41 |
files | util/stanza.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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