Comparison

util/xmppstream.lua @ 4289:1e68721c02f2

Merge 0.7->0.8
author Matthew Wild <mwild1@gmail.com>
date Thu, 02 Jun 2011 15:28:12 +0100
parent 4288:core/xmlhandlers.lua@8fde6b6b4919
parent 4282:core/xmlhandlers.lua@f5a46b73432b
child 4290:aaa06e68a9e4
child 4305:e3ffa91517cc
comparison
equal deleted inserted replaced
4285:c806a599224a 4289:1e68721c02f2
157 cb_error(session, "parse-error", "unexpected-element-close", name); 157 cb_error(session, "parse-error", "unexpected-element-close", name);
158 end 158 end
159 stanza, chardata = nil, {}; 159 stanza, chardata = nil, {};
160 end 160 end
161 end 161 end
162 162
163 local function restricted_handler() 163 local function restricted_handler(parser)
164 cb_error(session, "parse-error", "restricted-xml", "Restricted XML, see RFC 6120 section 11.1."); 164 cb_error(session, "parse-error", "restricted-xml", "Restricted XML, see RFC 6120 section 11.1.");
165 if not parser:stop() then
166 error("Failed to abort parsing");
167 end
165 end 168 end
166 169
167 if lxp_supports_doctype then 170 if lxp_supports_doctype then
168 xml_handlers.StartDoctypeDecl = restricted_handler; 171 xml_handlers.StartDoctypeDecl = restricted_handler;
169 end 172 end