diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index d873385d7d..395c07bad0 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -3916,6 +3916,7 @@ function fillTemplatePopUp(template, dialog){ }); }; + // Populates the Avanced mode Tab $('#template',dialog).val(convert_template_to_string(template).replace(/^[\r\n]+$/g, "")); // @@ -3924,7 +3925,7 @@ function fillTemplatePopUp(template, dialog){ var capacity_section = $('#capacityTab', dialog); autoFillInputs(template, capacity_section); - $("#DESCRIPTION", capacity_section).val(template["DESCRIPTION"]); + $("#DESCRIPTION", capacity_section).val(escapeDoubleQuotes(htmlDecode(template["DESCRIPTION"]))); delete template["DESCRIPTION"]; // @@ -4278,7 +4279,7 @@ function fillTemplatePopUp(template, dialog){ var parts = value.split("|"); $(".user_input_name", context).val(key); $(".user_input_type", context).val(parts[1]); - $(".user_input_description", context).val(parts[2]); + $(".user_input_description", context).val(escapeDoubleQuotes(htmlDecode(parts[2]))); $(".add_service_custom_attr", context_section).trigger("click"); @@ -4347,10 +4348,9 @@ function fillTemplatePopUp(template, dialog){ var element2 = document.createElement("input"); element2.id = "VALUE"; element2.type = "text"; - element2.value = htmlDecode(value); + element2.value = escapeDoubleQuotes(htmlDecode(value)); cell2.appendChild(element2); - var cell3 = row.insertCell(2); cell3.innerHTML = ""; }