From 950a6c507f70e97eefaf7871ccfe8f59f9d69e84 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.anjos@idiap.ch>
Date: Mon, 14 Mar 2016 17:30:35 +0100
Subject: [PATCH] [algorithms] Protected algorithm declaration with  django
 filter (closes #417)

---
 beat/web/algorithms/templates/algorithms/edition.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/beat/web/algorithms/templates/algorithms/edition.html b/beat/web/algorithms/templates/algorithms/edition.html
index 5237b283d..21a91d308 100644
--- a/beat/web/algorithms/templates/algorithms/edition.html
+++ b/beat/web/algorithms/templates/algorithms/edition.html
@@ -78,7 +78,7 @@ function setupEditor(algorithm, dataformats, libraries)
 
 
   // Options
-  var declaration = JSON.parse('{{ declaration|safe }}');
+  var declaration = JSON.parse('{{ declaration|escapejs }}');
 
   var checkbox_analyzer   = $('#checkbox_analyzer');
   var checkbox_splittable = $('#checkbox_splittable');
-- 
GitLab