Manage new-lines and extra whitespaces properly
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
This commit is contained in:
parent
be5196ba44
commit
54875fffc1
@ -131,14 +131,16 @@ if (isset($_REQUEST['report_export'])
|
||||
) {
|
||||
@ini_set('url_rewriter.tags', '');
|
||||
|
||||
// Replace all multiple whitespaces by a single space
|
||||
$table = htmlspecialchars(preg_replace('/\s+/', ' ', $_REQUEST['table']));
|
||||
$dump = "# " . sprintf(
|
||||
__('Tracking report for table `%s`'), htmlspecialchars($_REQUEST['table'])
|
||||
__('Tracking report for table `%s`'), $table
|
||||
)
|
||||
. "\n" . "# " . date('Y-m-d H:i:s') . "\n";
|
||||
foreach ($entries as $entry) {
|
||||
$dump .= $entry['statement'];
|
||||
}
|
||||
$filename = 'log_' . htmlspecialchars($_REQUEST['table']) . '.sql';
|
||||
$filename = 'log_' . $table . '.sql';
|
||||
PMA_downloadHeader($filename, 'text/x-sql', strlen($dump));
|
||||
|
||||
echo $dump;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user