Software /
code /
prosody
Changeset
8890:3490bc478804
util.stanza: Verify that other objects added as children are valid strings
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 08 Jun 2018 17:06:21 +0200 |
parents | 8889:c4e430c69f88 |
children | 8891:d9b7db6f140f |
files | util/stanza.lua |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/stanza.lua Fri Jun 08 17:04:47 2018 +0200 +++ b/util/stanza.lua Fri Jun 08 17:06:21 2018 +0200 @@ -137,8 +137,11 @@ function stanza_mt:add_direct_child(child) if is_stanza(child) then t_insert(self.tags, child); + t_insert(self, child); + else + check_text(child, "text"); + t_insert(self, child); end - t_insert(self, child); end function stanza_mt:add_child(child)