diff --git a/ChangeLog b/ChangeLog index a4748b9a8e..c0f19cac1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ phpMyAdmin - ChangeLog - issue #12762 Fixed parsing of SQL with BINARY function - issue #12588 ReCaptcha now works without allow_url_fopen - issue #12699 Show no local storage warning only on settings tab +- issue #12765 Fixed SQL export with newlines 4.6.5.1 (2016-11-25) - issue #12735 Incorrect parameters to escapeString in Node.php diff --git a/libraries/plugins/export/ExportSql.php b/libraries/plugins/export/ExportSql.php index df13901294..b44ddc07c3 100644 --- a/libraries/plugins/export/ExportSql.php +++ b/libraries/plugins/export/ExportSql.php @@ -2317,8 +2317,6 @@ class ExportSql extends ExportPlugin } //\x08\\x09, not required - $search = array("\x00", "\x0a", "\x0d", "\x1a"); - $replace = array('\0', '\n', '\r', '\Z'); $current_row = 0; $query_size = 0; if (($GLOBALS['sql_insert_syntax'] == 'extended' @@ -2411,13 +2409,7 @@ class ExportSql extends ExportPlugin } else { // something else -> treat as a string $values[] = '\'' - . $GLOBALS['dbi']->escapeString( - str_replace( - $search, - $replace, - $row[$j] - ) - ) + . $GLOBALS['dbi']->escapeString($row[$j]) . '\''; } // end if } // end for