This commit is contained in:
Laurent Destailleur 2020-02-15 10:56:44 +01:00
parent 824dac31d9
commit 6c9fb06292

View File

@ -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) 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 ($incbefore) $text = $incbefore.$text;
if (!$htmltext) return $text; if (!$htmltext) return $text;
@ -474,9 +472,7 @@ class Form
if ($notabs == 2) $tag = 'div'; if ($notabs == 2) $tag = 'div';
if ($notabs == 3) $tag = 'span'; if ($notabs == 3) $tag = 'span';
// Sanitize tooltip // Sanitize tooltip
//$htmltext=str_replace("\\","\\\\",$htmltext); $htmltext = str_replace(array("\r", "\n"), '', $htmltext);
$htmltext = str_replace("\r", "", $htmltext);
$htmltext = str_replace("\n", "", $htmltext);
$extrastyle = ''; $extrastyle = '';
if ($direction < 0) { $extracss = ($extracss ? $extracss.' ' : '').($notabs != 3 ? 'inline-block' : ''); $extrastyle = 'padding: 0px; padding-left: 3px !important;'; } 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 == '') if ($tooltiptrigger == '')
{ {
$htmltext = str_replace('"', "&quot;", $htmltext); $htmltext = str_replace('"', '&quot;', $htmltext);
} }
else else
{ {