From a862b5d5c307c6b28c4212835b9c3e55c2d3e2c0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Apr 2012 15:44:04 +0200 Subject: [PATCH] Fix: Try a better fix. Format of content of table should depend of content and output rules and not on how data was input. --- htdocs/core/lib/pdf.lib.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 8469ca9b931..fa6283b8e30 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -809,8 +809,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl { if ($libelleproduitservice && empty($hidedesc)) { - if ($conf->global->FCKEDITOR_ENABLE_DETAILS) $libelleproduitservice.='
'; - else $libelleproduitservice.="\n"; + $libelleproduitservice.='__N__'; } if ($desc == '(CREDIT_NOTE)' && $object->lines[$i]->fk_remise_except) @@ -889,11 +888,13 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl $period='('.$outputlangs->transnoentitiesnoconv('DateUntil',dol_print_date($object->lines[$i]->date_end, $format, false, $outputlangs)).')'; } //print '>'.$outputlangs->charset_output.','.$period; - $libelleproduitservice.="\n".$period; + $libelleproduitservice.="__N__".$period; //print $libelleproduitservice; } // Now we convert \n into br + if (dol_textishtml($libelleproduitservice)) $libelleproduitservice=preg_replace('/__N__/','
',$libelleproduitservice); + else $libelleproduitservice=preg_replace('/__N__/',"\n",$libelleproduitservice); $libelleproduitservice=dol_htmlentitiesbr($libelleproduitservice,1); return $libelleproduitservice;