diff --git a/ChangeLog b/ChangeLog index 5f941c9a1..e531794c7 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,12 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-11-05 Garvin Hicking + * libraries/common.lib.php3: Bug #835854. The MySQL-error messages + are now put inside a HTML-container, not
. This allows
+      wordwrapping to hide vertical scrollbars. Linebreak/Whitespace
+      formatting has been altered to preserve those.
+
 2003-11-04 Marc Delisle  
     * Documentation.html: bug 833900, added known limitation in FAQ 3.10
       about selecting homonyms on a table without primary key
diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3
index a3c64258b..176921242 100644
--- a/libraries/common.lib.php3
+++ b/libraries/common.lib.php3
@@ -503,9 +503,20 @@ h1    {font-family: sans-serif; font-size: large; font-weight: bold}
             echo '

' . "\n" . ' ' . $GLOBALS['strMySQLSaid'] . '
' . "\n" . '

' . "\n"; - echo '
' . "\n"
+
+            // The error message will be displayed within a CODE segment.
+            // To preserve original formatting, but allow wordwrapping, we do a couple of replacements
+
+            // Replace all non-single blanks with their HTML-counterpart
+            $error_message = str_replace('  ', '  ', $error_message);
+            // Replace TAB-characters with their HTML-counterpart
+            $error_message = str_replace("\t", '    ', $error_message);
+            // Replace linebreaks
+            $error_message = nl2br($error_message);
+
+            echo '' . "\n"
                     . $error_message . "\n"
-                    . '
' . "\n"; + . '

' . "\n"; echo PMA_showMySQLDocu('Error-returns', 'Error-returns');