diff --git a/lib.inc.php3 b/lib.inc.php3
index b8c1daf39..1495c45a0 100755
--- a/lib.inc.php3
+++ b/lib.inc.php3
@@ -1152,11 +1152,20 @@ var errorMsg2 = '[BLOB]' . "\n";
} else {
if (strlen($row[$i]) > $GLOBALS['cfgLimitChars']) {
- $row[$i] = substr($row[$i], 0, $GLOBALS['cfgLimitChars']) . '...';
+ // loic1: added a link to display the whole text
+ // field in a js alert box
+ $alert = '';
+ $tmp = explode("\n", str_replace("\r", ' ', $row[$i]));
+ for ($j = 0; $j < count($tmp); $j++) {
+ $alert .= addslashes(str_replace('"', '"', trim($tmp[$j]))) . '\n';
+ }
+ unset($tmp);
+ $row[$i] = ereg_replace("((\015\012)|(\015)|(\012))+", '
', htmlspecialchars($row[$i]));
+ $row[$i] = substr($row[$i], 0, $GLOBALS['cfgLimitChars'])
+ . '... '
+ . '[+]';
}
- // loic1 : displays /
if ($row[$i] != '') {
- $row[$i] = ereg_replace("((\015\012)|(\015)|(\012))+", '
', htmlspecialchars($row[$i]));
echo ' ' . $row[$i] . ' | ' . "\n";
} else {
echo ' | ' . "\n";