diff --git a/ChangeLog b/ChangeLog index eb73f0a5e..9272b6ef1 100755 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,8 @@ $Source$ * left.php3: Improved performance by using str_replace instead of ereg_replace. * lang/german*: Translations. + * libraries/common.lib.php3: Fix bug #736609 (Escaping of + 'Show as PHP') 2003-05-13 Michal Cihar * left.php3: Fixed displaying of tables with quote in name. diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3 index 568687b63..8fd397980 100644 --- a/libraries/common.lib.php3 +++ b/libraries/common.lib.php3 @@ -1352,14 +1352,14 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold} } if (isset($new_line)) { /* SQL-Parser-Analyzer */ - $query_base = htmlspecialchars($local_query); + $query_base = PMA_sqlAddslashes(htmlspecialchars($local_query)); /* SQL-Parser-Analyzer */ $query_base = ereg_replace("((\015\012)|(\015)|(\012))+", $new_line, $query_base); } else { $query_base = $local_query; } if (!empty($GLOBALS['show_as_php'])) { - $query_base = '$sql = \'' . PMA_sqlAddslashes($query_base); + $query_base = '$sql = \'' . $query_base; } else if (!empty($GLOBALS['validatequery'])) { $query_base = PMA_validateSQL($query_base); } else {