From f6ecac42ac840b454cf6c6eeb8f592277e15c4a7 Mon Sep 17 00:00:00 2001 From: dahn Date: Thu, 23 May 2019 07:50:42 +0200 Subject: [PATCH] ui: reverse character replacements (#3260) In the cloudstack UI fields get '<', '>' and '&' replaced by xml-entities these are generic for all fields and hurt us in the case of userdata this fix calls the existing method to reverse character replacements. it also removes the ccs class that pretends to prevent special chars Fixes #3202 --- ui/index.html | 2 +- ui/scripts/instanceWizard.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/index.html b/ui/index.html index b9d961df0d5..a71d82395f0 100644 --- a/ui/index.html +++ b/ui/index.html @@ -558,7 +558,7 @@ ()
- +
diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js index 351ca7b3020..1234cfa7de3 100644 --- a/ui/scripts/instanceWizard.js +++ b/ui/scripts/instanceWizard.js @@ -1094,8 +1094,9 @@ var userdata = args.data.userdata; if (userdata != null && userdata.length > 0) { + $.extend(deployVmData, { - userdata : encodeURIComponent(btoa(userdata)) + userdata : encodeURIComponent(btoa(cloudStack.sanitizeReverse(userdata))) }); }