From 16e5c665c3e3761512c50a0b7e148ff81e3185f9 Mon Sep 17 00:00:00 2001
From: ARNO* <arno@rezo.net>
Date: Sat, 9 Aug 2003 15:53:50 +0000
Subject: [PATCH] correction bug: les coupures de INTRO se faisaient au milieu
 des mots

---
 ecrire/inc_texte.php3 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ecrire/inc_texte.php3 b/ecrire/inc_texte.php3
index 9f63e5316b..d6dd9e47ce 100644
--- a/ecrire/inc_texte.php3
+++ b/ecrire/inc_texte.php3
@@ -224,10 +224,10 @@ function couper($texte, $long) {
 	// supprimer les codes typos
 	$texte = ereg_replace("[{}]", "", $texte);
 
-	$texte2 = substr($texte." ", 0, $long);
+	$texte2 = substr($texte, 0, $long);
 	$texte2 = ereg_replace("([^[:space:]][[:space:]]+)[^[:space:]]*$", "\\1", $texte2);
 	if ((strlen($texte2) + 3) < strlen($texte)) $plus_petit = true;
-	if ($plus_petit) $texte2 .= ' (...)';
+	if ($plus_petit) $texte2 .= '&nbsp;(...)';
 	return $texte2;
 }
 
-- 
GitLab