diff --git a/beat/web/algorithms/templates/algorithms/edition.html b/beat/web/algorithms/templates/algorithms/edition.html
index 5237b283d0ad4e5b0218a15a8b3f8c62e2ac95ab..21a91d30808bbe7e0f7ef53bd6cb795eabcef255 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');