diff --git a/lib.inc.php3 b/lib.inc.php3
index 06a0b10a1..8acb48740 100755
--- a/lib.inc.php3
+++ b/lib.inc.php3
@@ -521,7 +521,7 @@ window.parent.frames['nav'].location.replace('');
// xhtml1.0 statement before php4.0.5 ("
" and not "
")
$new_line = '
' . "\n" . ' ';
$query_base = htmlspecialchars($GLOBALS['sql_query']);
- $query_base = ereg_replace("(\015\012)|(\015)|(\012)", $new_line, $query_base);
+ $query_base = ereg_replace("((\015\012)|(\015)|(\012))+", $new_line, $query_base);
if (!isset($GLOBALS['show_query']) || $GLOBALS['show_query'] != 'y') {
if (isset($GLOBALS['goto']) && $GLOBALS['goto'] == 'tbl_properties.php3') {
$edit_link = '' . $GLOBALS['strEdit'] . '';