diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 8dcbacd43c7..ba8fcabe3f1 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -465,8 +465,6 @@ class Form */ public function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 3, $incbefore = '', $noencodehtmltext = 0, $tooltiptrigger = '', $forcenowrap = 0) { - global $conf; - if ($incbefore) $text = $incbefore.$text; if (!$htmltext) return $text; @@ -474,9 +472,7 @@ class Form if ($notabs == 2) $tag = 'div'; if ($notabs == 3) $tag = 'span'; // Sanitize tooltip - //$htmltext=str_replace("\\","\\\\",$htmltext); - $htmltext = str_replace("\r", "", $htmltext); - $htmltext = str_replace("\n", "", $htmltext); + $htmltext = str_replace(array("\r", "\n"), '', $htmltext); $extrastyle = ''; if ($direction < 0) { $extracss = ($extracss ? $extracss.' ' : '').($notabs != 3 ? 'inline-block' : ''); $extrastyle = 'padding: 0px; padding-left: 3px !important;'; } @@ -488,7 +484,7 @@ class Form if ($tooltiptrigger == '') { - $htmltext = str_replace('"', """, $htmltext); + $htmltext = str_replace('"', '"', $htmltext); } else {