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
This commit is contained in:
dahn 2019-05-23 07:50:42 +02:00 committed by Rohit Yadav
parent 3e642852a7
commit f6ecac42ac
2 changed files with 3 additions and 2 deletions

View File

@ -558,7 +558,7 @@
<span><translate key="label.add.userdata"/> (<translate key="label.optional"/>)</span>
</div>
<div class="value">
<textarea name="userdata" class="disallowSpecialCharacters"></textarea>
<textarea name="userdata"></textarea>
</div>
</div>
</div>

View File

@ -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)))
});
}