diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php
index 31989eeb31..615a5a791e 100644
--- a/phpgwapi/inc/class.html.inc.php
+++ b/phpgwapi/inc/class.html.inc.php
@@ -93,7 +93,7 @@ class html
}
if ($text === False) return ' onmouseover="'.$opt_out.'return escape(this.innerHTML);"';
- return ' onmouseover="'.$opt_out.'return escape(\''.addslashes(@htmlentities(str_replace(array("\n","\r"),' ',$text),ENT_COMPAT,$this->charset)).'\')"';
+ return ' onmouseover="'.$opt_out.'return escape(\''.str_replace(array("\n","\r","'",'"'),array('
','',"\\'",'"'),$text).'\')"';
}
function activate_links($content)