diff --git a/ChangeLog b/ChangeLog index 73c5d06dc..046b76fea 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2001-11-30 Loïc Chapeaux + * libraries/display_tbl.lib.php3: fixed bug #486509 - Text fields don't + display newlines. + 2001-11-29 Loïc Chapeaux * header.inc.php3, lines 76-83: displays verbose server description rather than hostname as window title. diff --git a/libraries/display_tbl.lib.php3 b/libraries/display_tbl.lib.php3 index 3d7370bb0..95325c264 100644 --- a/libraries/display_tbl.lib.php3 +++ b/libraries/display_tbl.lib.php3 @@ -779,8 +779,11 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ if (strlen($row[$primary->name]) > $GLOBALS['cfgLimitChars'] && ($dontlimitchars != 1)) { $row[$primary->name] = substr($row[$primary->name], 0, $GLOBALS['cfgLimitChars']) . '...'; } - // loic1: displays / - $row[$primary->name] = ereg_replace("((\015\012)|(\015)|(\012))+", '
', htmlspecialchars($row[$primary->name])); + // loic1: displays all space characters, 4 space + // characters for tabulations and / + $row[$primary->name] = htmlspecialchars($row[$primary->name]); + $row[$primary->name] = str_replace("\011", '    ', str_replace(' ', ' ', $row[$primary->name])); + $row[$primary->name] = ereg_replace("((\015\012)|(\015)|(\012))", '
', $row[$primary->name]); echo ' ' . $row[$primary->name] . '' . "\n"; } else { echo '  ' . "\n"; @@ -806,9 +809,12 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ $row[$primary->name] = str_replace("\x0d", '\r', $row[$primary->name]); $row[$primary->name] = str_replace("\x1a", '\Z', $row[$primary->name]); } - // loic1: displays / + // loic1: displays all space characters, 4 space + // characters for tabulations and / else { - $row[$primary->name] = ereg_replace("((\015\012)|(\015)|(\012))+", '
', htmlspecialchars($row[$primary->name])); + $row[$primary->name] = htmlspecialchars($row[$primary->name]); + $row[$primary->name] = str_replace("\011", '    ', str_replace(' ', ' ', $row[$primary->name])); + $row[$primary->name] = ereg_replace("((\015\012)|(\015)|(\012))", '
', $row[$primary->name]); } echo ' ' . $row[$primary->name] . '' . "\n"; } else {