diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 931b5e6420c..96a7ae50dfd 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -497,7 +497,7 @@ if ($result) { print ''; print ''; - $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description)); + $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description, 1)); $trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION; print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->description); print ''; diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 80b7bdf2217..bc6713f0846 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -637,7 +637,7 @@ if ($result) { // Description print ''; - $text = dolGetFirstLineOfText(dol_string_nohtmltag($facture_static_det->desc)); + $text = dolGetFirstLineOfText(dol_string_nohtmltag($facture_static_det->desc, 1)); $trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION; print $form->textwithtooltip(dol_trunc($text, $trunclength), $facture_static_det->desc); print ''; diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index ff7b9295693..005783ed7a8 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -405,7 +405,7 @@ if ($result) { // Fees description -- Can be null print ''; - $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->comments)); + $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->comments, 1)); $trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION; print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->comments); print ''; diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index d95f4ff67b9..033f1164dc7 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -481,7 +481,7 @@ if ($result) { // Fees description -- Can be null print ''; - $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->comments)); + $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->comments, 1)); $trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION; print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->comments); print ''; diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 9f769ae13b4..7d1960459bc 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -502,7 +502,7 @@ if ($result) { print ''; print ''; - $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description)); + $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description, 1)); $trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION; print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->description); print ''; diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 24d0ed08a0a..0af840e3599 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -644,7 +644,7 @@ if ($result) { // Description print ''; - $text = dolGetFirstLineOfText(dol_string_nohtmltag($facturefourn_static_det->desc)); + $text = dolGetFirstLineOfText(dol_string_nohtmltag($facturefourn_static_det->desc, 1)); $trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION; print $form->textwithtooltip(dol_trunc($text, $trunclength), $facturefourn_static_det->desc); print ''; diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index 04f2288ae08..f4456ed79bf 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -133,7 +133,9 @@ if (empty($nosearch)) { print ''; print "\n"; print "\t\t"; - print dolGetFirstLineOfText($cat->description); + $text = dolGetFirstLineOfText(dol_string_nohtmltag($cat->description, 1)); + $trunclength = 48; + print $form->textwithtooltip(dol_trunc($text, $trunclength), $cat->description); print "\n"; print "\t\n"; } diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index e2b412e15db..f6932cc4bef 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -943,8 +943,8 @@ while ($i < min($num, $limit)) { // Description if (!empty($arrayfields['a.note']['checked'])) { print ''; - $text = dolGetFirstLineOfText(dol_string_nohtmltag($actionstatic->note_private, 0)); - print $form->textwithtooltip(dol_trunc($text, 40), $actionstatic->note_private); + $text = dolGetFirstLineOfText(dol_string_nohtmltag($actionstatic->note_private, 1)); + print $form->textwithtooltip(dol_trunc($text, 48), $actionstatic->note_private); print ''; } diff --git a/htdocs/core/modules/action/rapport.pdf.php b/htdocs/core/modules/action/rapport.pdf.php index 8b80492685d..1ee7ff94998 100644 --- a/htdocs/core/modules/action/rapport.pdf.php +++ b/htdocs/core/modules/action/rapport.pdf.php @@ -261,7 +261,7 @@ class CommActionRapport if (!preg_match('/^'.preg_quote($obj->label, '/').'/', $obj->note)) { $text = $obj->label."\n"; } - $text .= dolGetFirstLineOfText(dol_string_nohtmltag($obj->note), 2); + $text .= dolGetFirstLineOfText(dol_string_nohtmltag($obj->note), 1); // Add status to text $text .= "\n"; $status = $outputlangs->trans("Status").': '.dol_htmlentitiesbr_decode($eventstatic->getLibStatut(1, 1)); diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index c61fa4b1393..46a9f2eee3f 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -666,7 +666,7 @@ if ($resql) { } } if (!empty($arrayfields['f.description']['checked'])) { - print ''.dol_trunc(dolGetFirstLineOfText($obj->description), 48).''; + print ''.dol_trunc(dolGetFirstLineOfText(dol_string_nohtmltag($obj->description, 1)), 48).''; if (!$i) { $totalarray['nbfield']++; } @@ -723,7 +723,7 @@ if ($resql) { } // Fields of detail of line if (!empty($arrayfields['fd.description']['checked'])) { - print ''.dolGetFirstLineOfText($obj->descriptiondetail).''; + print ''.dol_trunc(dolGetFirstLineOfText(dol_string_nohtmltag($obj->descriptiondetail, 1)), 48).''; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php index 9080072220e..48889ab6a37 100644 --- a/htdocs/holiday/month_report.php +++ b/htdocs/holiday/month_report.php @@ -418,7 +418,7 @@ if ($num == 0) { print ''.num_open_day($date_start_inmonth, $date_end_inmonth, 0, 1, $halfdayinmonth).''; } if (!empty($arrayfields['cp.description']['checked'])) { - print ''.dol_escape_htmltag(dolGetFirstLineOfText($obj->description)).''; + print ''.dolGetFirstLineOfText(dol_string_nohtmltag($obj->description, 1)).''; } print '';