2009-09-29 Miguel de Dios <miguel.dedios@artica.es>
* include/javascript/pandora_mod, include/javascript/pandora.js: cleanup the sourcecode and add more funcionality to funciton "html_entity_decode". git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1990 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
6e5ea3f84c
commit
6d09c7030e
|
@ -30,7 +30,10 @@ function html_entity_decode (str) {
|
|||
if (! str)
|
||||
return "";
|
||||
var ta = document.createElement ("textarea");
|
||||
ta.innerHTML = str.replace (/</g, "<").replace (/>/g,">");
|
||||
ta.innerHTML = str.replace (/</g, "<").
|
||||
replace (/>/g,">").replace(/</g,'<').replace(/>/g,'>')
|
||||
.replace(/\/g,'\\').replace(/"/g,'\"').replace(/'/g,'\'')
|
||||
.replace(/&/g,'&');
|
||||
|
||||
return ta.value;
|
||||
}
|
||||
|
|
|
@ -68,9 +68,7 @@ function configure_modules_form () {
|
|||
"id_module_component" : this.value
|
||||
},
|
||||
function (data, status) {
|
||||
configuration_data = data['data']
|
||||
.replace(/</g,'<').replace(/>/g,'>')
|
||||
.replace(/\/g,'\\').replace(/"/g,'\"').replace(/'/g,'\'').replace(/&/g,'&');
|
||||
configuration_data = html_entity_decode (data['data']);
|
||||
|
||||
$("#text-name").attr ("value", html_entity_decode (data["name"]));
|
||||
$("#textarea_description").attr ("value", html_entity_decode (data["description"]));
|
||||
|
|
Loading…
Reference in New Issue