diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 2e3826cd35..5763c8aaa5 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2009-09-09 Miguel de Dios + + * include/javascript/pandora_modules.js: clean code. + * include/javascript/pandora.js: fix bug in ie6 that it remove the "\n". + + 2009-09-09 Miguel de Dios * include/functions_network_components.php: add bool param $localComponent diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index 82d2e0cba7..b47ddd60f6 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -31,6 +31,7 @@ function html_entity_decode (str) { return ""; var ta = document.createElement ("textarea"); ta.innerHTML = str.replace (//g,">"); + return ta.value; } diff --git a/pandora_console/include/javascript/pandora_modules.js b/pandora_console/include/javascript/pandora_modules.js index 84da5ff724..4431287253 100644 --- a/pandora_console/include/javascript/pandora_modules.js +++ b/pandora_console/include/javascript/pandora_modules.js @@ -68,9 +68,11 @@ function configure_modules_form () { "id_module_component" : this.value }, function (data, status) { + configuration_data = data['data'].replace(/</g,'<').replace(/>/g,'>').replace(/&/g,'&'); + $("#text-name").attr ("value", html_entity_decode (data["name"])); $("#textarea_description").attr ("value", html_entity_decode (data["description"])); - $("#textarea_configuration_data").attr ("value", html_entity_decode (data["data"])); + $("#textarea_configuration_data").attr ("value", configuration_data); $("#component_loading").hide (); $("#id_module_type").change (); },