diff --git a/adminer/select.inc.php b/adminer/select.inc.php index d20ab640..3cd263b6 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -142,7 +142,7 @@ if ($_POST && !$error) { $cols = " (" . implode(", ", array_map('idf_escape', $matches2[1])) . ")"; } else { foreach ($matches2[1] as $col) { - $row[] = (!strlen($col) ? "NULL" : $dbh->quote(str_replace('""', '"', preg_replace('~^"(.*)"$~s', '\\1', $col)))); + $row[] = (!strlen($col) ? "NULL" : $dbh->quote(str_replace('""', '"', preg_replace('~^"|"$~', '', $col)))); } $rows[] = "\n(" . implode(", ", $row) . ")"; }