From a2e2b6e44551a77e9669b06179b9fed63da77583 Mon Sep 17 00:00:00 2001 From: ichuang Date: Wed, 20 Jun 2012 23:37:40 -0400 Subject: [PATCH] allow javascript in problem xml --- common/lib/capa/capa_problem.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/lib/capa/capa_problem.py b/common/lib/capa/capa_problem.py index c4ed385e5e..7803ee97f9 100644 --- a/common/lib/capa/capa_problem.py +++ b/common/lib/capa/capa_problem.py @@ -316,6 +316,10 @@ class LoncapaProblem(object): Used by get_html. ''' + if problemtree.tag=='script' and problemtree.get('type') and 'javascript' in problemtree.get('type'): + # leave javascript intact. + return problemtree + if problemtree.tag in html_problem_semantics: return