# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1307024638 -3600
# Node ID 8fde6b6b4919df7288138835551df3ed70e0d42c
# Parent  5a0144a032d846d0df40c30c33a79ef510f5d094# Parent  ee6a18f10a8d7aa08e5f2ffe54c95c75c29ac42c
Merge 0.6->0.7

diff -r 5a0144a032d8 -r 8fde6b6b4919 core/xmlhandlers.lua
--- a/core/xmlhandlers.lua	Thu Jun 02 00:25:44 2011 +0100
+++ b/core/xmlhandlers.lua	Thu Jun 02 15:23:58 2011 +0100
@@ -150,8 +150,11 @@
 		end
 	end
 
-	local function restricted_handler()
+	local function restricted_handler(parser)
 		cb_error(session, "parse-error", "restricted-xml", "Restricted XML, see RFC 6120 section 11.1.");
+		if not parser:stop() then
+			error("Failed to abort parsing");
+		end
 	end
 
 	if lxp_supports_doctype then