From 623cbf89245b4870acde14b290c872dc38fcf8e0 Mon Sep 17 00:00:00 2001 From: Colin-Fredericks Date: Thu, 25 Feb 2021 16:45:04 -0500 Subject: [PATCH] feat(jsinput): Allow JSInput problems to create downloads --- common/lib/capa/capa/inputtypes.py | 1 + common/lib/capa/capa/templates/jsinput.html | 2 +- common/static/js/capa/fixtures/jsinput.html | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/lib/capa/capa/inputtypes.py b/common/lib/capa/capa/inputtypes.py index b18beec8e3..ebebc59d98 100644 --- a/common/lib/capa/capa/inputtypes.py +++ b/common/lib/capa/capa/inputtypes.py @@ -587,6 +587,7 @@ class JSInput(InputTypeBase): - allow-popups - allow-forms - allow-pointer-lock + - allow-downloads This in turn means that the iframe cannot directly access the top-level window elements. diff --git a/common/lib/capa/capa/templates/jsinput.html b/common/lib/capa/capa/templates/jsinput.html index cf47d1bfba..17761d9d70 100644 --- a/common/lib/capa/capa/templates/jsinput.html +++ b/common/lib/capa/capa/templates/jsinput.html @@ -28,7 +28,7 @@