2010-12-15 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_html.php, include/ajax/module.php: fixed when the module
	have a scape html chars.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3658 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-12-15 13:04:43 +00:00
parent 033d4c6221
commit 649b83a6d1
3 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2010-12-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/ajax/module.php: fixed when the module
have a scape html chars.
2010-12-03 Sergio Martin <sergio.martin@artica.es>
* operation/search_agents.php: Fixed alert fired number of modules

View File

@ -27,7 +27,7 @@ if ($search_modules) {
$modules = array_unique($modules);
foreach ($modules as $module) {
echo $module . "\n";
echo safe_output($module) . "\n";
}
}
?>

View File

@ -1310,6 +1310,14 @@ function print_autocomplete_modules($name = 'module', $default = '', $id_agents
?>
<script type="text/javascript">
function escapeHTML (str)
{
var div = document.createElement('div');
var text = document.createTextNode(str);
div.appendChild(text);
return div.innerHTML;
};
$(document).ready (function () {
$("#text-<?php echo $name; ?>").autocomplete(
"ajax.php",
@ -1331,7 +1339,7 @@ function print_autocomplete_modules($name = 'module', $default = '', $id_agents
if (data == "")
return false;
return data[0];
return escapeHTML(data[0]);
},
delay: 200
}