From e1def5c554894cf348f57cbd1a1f8af5313cb21d Mon Sep 17 00:00:00 2001 From: Adam Palay Date: Thu, 16 Oct 2014 10:47:36 -0400 Subject: [PATCH] gracefully fail when parsing xml with non-compatible string (TNL-347) --- common/lib/capa/capa/responsetypes.py | 8 +++++++- common/lib/capa/capa/tests/test_responsetypes.py | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index b1d122b405..2e394e5e1b 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -2111,7 +2111,13 @@ class CodeResponse(LoncapaResponse): except etree.XMLSyntaxError as _err: # If `html` contains attrs with no values, like `controls` in