mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
fixed for on??? atributes, which contain single quotes
This commit is contained in:
parent
291da54d43
commit
ce9c339c87
@ -86,9 +86,14 @@
|
||||
*/
|
||||
function get_body_attribs()
|
||||
{
|
||||
$js = ($this->body['onLoad'] ? 'onLoad="' . addslashes($this->body['onLoad']) . '"' : '');
|
||||
$js .= ($this->body['onUnload'] ? 'onUnLoad="' . addslashes($this->body['onUnload']) . '"': '');
|
||||
$js .= ($this->body['onResize'] ? 'onResize="' . addslashes($this->body['onResize']) . '"': '');
|
||||
$js = '';
|
||||
foreach(array('onLoad','onUnload','onResize') as $what)
|
||||
{
|
||||
if (!empty($this->body[$what]))
|
||||
{
|
||||
$js .= ' '.$what.'="' . str_replace(array('"','\\'),array('\\"','\\\\'),$this->body[$what]) . '"';
|
||||
}
|
||||
}
|
||||
return $js;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user