From 4a6cf520136bf88d2c72efe310390ba13d832846 Mon Sep 17 00:00:00 2001 From: Mathias Husted Torp Date: Wed, 26 Jan 2022 15:01:28 +0100 Subject: [PATCH] Allow javascript in options.innerHTML --- inst/assets/bootstrap-treeview/treeview-bindings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/assets/bootstrap-treeview/treeview-bindings.js b/inst/assets/bootstrap-treeview/treeview-bindings.js index 5a9ac21..3773586 100644 --- a/inst/assets/bootstrap-treeview/treeview-bindings.js +++ b/inst/assets/bootstrap-treeview/treeview-bindings.js @@ -86,7 +86,7 @@ $.extend(treeviewInputBinding, { var element = document.getElementById(el.id); var options = element.querySelector('script[data-for="' + el.id + '"]'); - options = JSON.parse(options.innerHTML); + options = eval("(" + options.innerHTML + ")"); $(el).treeview(options.config); var tree = $(el).treeview(true);