Fixed SQL export with newlines
Remove manual escaping where we do proper escaping through MySQL extension. Fixes #12765 Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
88bbbcf27d
commit
081843aa5c
@ -1,6 +1,9 @@
|
||||
phpMyAdmin - ChangeLog
|
||||
======================
|
||||
|
||||
4.6.5.2 (2016-12-05)
|
||||
- issue #12765 Fixed SQL export with newlines
|
||||
|
||||
4.6.5.1 (2016-11-25)
|
||||
- issue #12735 Incorrect parameters to escapeString in Node.php
|
||||
- issue #12734 Fix PHP error when mbstring is not installed
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user