From 45ab5dccca9dd78af0fe0aa8cc894ff5f320dfda Mon Sep 17 00:00:00 2001 From: dcore94 Date: Wed, 13 Dec 2023 18:29:44 +0100 Subject: [PATCH] encode to base64 before setting as attirbute to fix descriptions containing quotes --- ccp/js/executionformcontroller.js | 4 ++-- ccp/js/inputwidgetcontroller.js | 2 +- ccp/js/outputwidgetcontroller.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ccp/js/executionformcontroller.js b/ccp/js/executionformcontroller.js index 8ad3358..d164464 100644 --- a/ccp/js/executionformcontroller.js +++ b/ccp/js/executionformcontroller.js @@ -341,7 +341,7 @@ class CCPExecutionForm extends HTMLElement{ "in" : (e,d)=>{ return Object.values(d.inputs) }, target : "div", apply : (e,d)=>{ - e.innerHTML = `` + e.innerHTML = `` } } ] @@ -354,7 +354,7 @@ class CCPExecutionForm extends HTMLElement{ "in" : (e,d)=>{ return Object.values(d.outputs) }, target : "div", apply : (e,d)=>{ - e.innerHTML = `` + e.innerHTML = `` } } ] diff --git a/ccp/js/inputwidgetcontroller.js b/ccp/js/inputwidgetcontroller.js index c4c5285..41eb7db 100644 --- a/ccp/js/inputwidgetcontroller.js +++ b/ccp/js/inputwidgetcontroller.js @@ -7,7 +7,7 @@ class CCPInputWidgetController extends HTMLElement { } connectedCallback(){ - this.#data = JSON.parse(this.getAttribute("input")) + this.#data = JSON.parse(atob(this.getAttribute("input"))) if(this.isChecklist()){ diff --git a/ccp/js/outputwidgetcontroller.js b/ccp/js/outputwidgetcontroller.js index ab904ea..64ae654 100644 --- a/ccp/js/outputwidgetcontroller.js +++ b/ccp/js/outputwidgetcontroller.js @@ -4,7 +4,7 @@ class CCPOutputWidgetController extends HTMLElement { constructor(){ super() - this.#output = JSON.parse(this.getAttribute("output")) + this.#output = JSON.parse(atob(this.getAttribute("output"))) } connectedCallback(){