# HG changeset patch # User Kim Alvefur # Date 1528470381 -7200 # Node ID 3490bc478804030c7e39e8ecc02fe21e76640b3c # Parent c4e430c69f88f94333b134f297c2564a38cf0dbe util.stanza: Verify that other objects added as children are valid strings diff -r c4e430c69f88 -r 3490bc478804 util/stanza.lua --- 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)