While browsing a table, ensure <cr> and <lf> in text/blob fields are displayed

This commit is contained in:
Loïc Chapeaux
2001-08-21 11:25:42 +00:00
parent 409713b610
commit e311b8f565
2 changed files with 10 additions and 4 deletions

View File

@@ -18,6 +18,8 @@ $Source$
* lib.inc.php3:
- fixed again the socket patch, should work now.
- modified the way defines.inc.php3 is loaded.
- while browsing a table, ensure <cr> and <lf> in text/blob fields are
displayed (remplaced by the <br /> tag).
* defines.lib.php3; db_details; tbl_properties.php3: ensures each constant
isn't already defined before to define it and renamed PMA_INT_VERSION to
PHP_INT_VERSION.

View File

@@ -93,8 +93,6 @@ if (!defined('__LIB_INC__')){
if (!isset($cfgTextareaRows)) {
$cfgTextareaRows = 7;
}
// defines wants to connect mysql, and at this place there are no connexion yet...
include('./defines.inc.php3');
@@ -1180,10 +1178,16 @@ var errorMsg2 = '<?php echo(str_replace('\'', '\\\'', $GLOBALS['strNotValidNumbe
if (strlen($row[$i]) > $GLOBALS['cfgLimitChars']) {
$row[$i] = substr($row[$i], 0, $GLOBALS['cfgLimitChars']) . '...';
}
echo ' <td>&nbsp;' . htmlspecialchars($row[$i]) . '&nbsp;</td>' . "\n";
// loic1 : displays <cr>/<lf>
// echo ' <td>&nbsp;' . htmlspecialchars($row[$i]) . '&nbsp;</td>' . "\n";
$row[$i] = ereg_replace("((\015\012)|(\015)|(\012))+", '<br />', htmlspecialchars($row[$i]));
echo ' <td>&nbsp;' . $row[$i] . '&nbsp;</td>' . "\n";
}
} else {
echo ' <td>&nbsp;' . htmlspecialchars($row[$i]) . '&nbsp;</td>' . "\n";
// loic1 : displays <cr>/<lf>
// echo ' <td>&nbsp;' . htmlspecialchars($row[$i]) . '&nbsp;</td>' . "\n";
$row[$i] = ereg_replace("((\015\012)|(\015)|(\012))+", '<br />', htmlspecialchars($row[$i]));
echo ' <td>&nbsp;' . $row[$i] . '&nbsp;</td>' . "\n";
}
} // end for
// Possibility to have the modify/delete button on the left added