diff options
author | Kim Alvefur <zash@zash.se> | 2018-06-08 17:06:21 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-06-08 17:06:21 +0200 |
commit | 22e7fd2be13bfc286f6f4656fdbd368ba116bcda (patch) | |
tree | 4e3703cef9352587d8d681533d226d4b60d349ce | |
parent | 1836db91623887b736250cc0a8840fba44368bd8 (diff) | |
download | prosody-22e7fd2be13bfc286f6f4656fdbd368ba116bcda.tar.gz prosody-22e7fd2be13bfc286f6f4656fdbd368ba116bcda.zip |
util.stanza: Verify that other objects added as children are valid strings
-rw-r--r-- | util/stanza.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/util/stanza.lua b/util/stanza.lua index 6453be48..2691cb0b 100644 --- a/util/stanza.lua +++ b/util/stanza.lua @@ -137,8 +137,11 @@ end 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) |