diff --git a/phpgwapi/inc/class.javascript.inc.php b/phpgwapi/inc/class.javascript.inc.php index f4a71198ca..e36ced9aa3 100644 --- a/phpgwapi/inc/class.javascript.inc.php +++ b/phpgwapi/inc/class.javascript.inc.php @@ -97,7 +97,7 @@ { if (!empty($this->body[$what])) { - $js .= ' '.$what.'="' . str_replace(array('"','\\'),array('\\"','\\\\'),$this->body[$what]) . '"'; + $js .= ' '.$what.'="' . str_replace(array('\\\'','"','\\','''),array(''','\\"','\\\\','\\\''),$this->body[$what]) . '"'; } } return $js;