Skip to content

Commit

Permalink
reverse character replacements that are generic for all fields and hu…
Browse files Browse the repository at this point in the history
…rt userdata
  • Loading branch information
Daan Hoogland committed Mar 18, 2019
1 parent e8a39d1 commit 0cbc25d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ui/scripts/instanceWizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -1094,8 +1094,15 @@

var userdata = args.data.userdata;
if (userdata != null && userdata.length > 0) {

// NOTE code duplicated from sanatizeReverse in ui/utils.js because of call propagation issues
userdata = userdata
.replace(/&/g, "&")
.replace(/&lt;/g, "<")
.replace(/&gt;/g, ">");

$.extend(deployVmData, {
userdata : encodeURIComponent(btoa(userdata))
userdata : btoa(userdata)
});
}

Expand Down

0 comments on commit 0cbc25d

Please sign in to comment.