diff --git a/src/plugins/plugin_xep_0277.py b/src/plugins/plugin_xep_0277.py index 5a40cc2f..d1a91277 100755 --- a/src/plugins/plugin_xep_0277.py +++ b/src/plugins/plugin_xep_0277.py @@ -173,6 +173,8 @@ class XEP_0277(object): type_ = elem.getAttribute('type') if type_ == 'xhtml': data_elt = elem.firstChildElement() + if data_elt is None: + raise failure.Failure(exceptions.DataError(u"XHML content not wrapped in a
element, this is not standard !")) if data_elt.uri != NS_XHTML: raise failure.Failure(exceptions.DataError(_('Content of type XHTML must declare its namespace!'))) key = check_conflict(u'{}_xhtml'.format(elem.name))