Use wpdb->escape instead of addslashes to prepare DB bound data.

git-svn-id: https://develop.svn.wordpress.org/trunk@2699 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2005-07-05 20:47:22 +00:00
parent bcb1e84446
commit b3f7bd726c
19 changed files with 101 additions and 89 deletions
+2 -2
View File
@@ -98,8 +98,8 @@ while ($post = mysql_fetch_array($posts)) {
$timestamp = mktime($hour, $minute, $second, $month, $day, $year);
$posted = date('Y-m-d H:i:s', $timestamp);
$content = addslashes($post['Body_html']);
$title = addslashes($post['Title']);
$content = $wpdb->escape($post['Body_html']);
$title = $wpdb->escape($post['Title']);
$post_name = sanitize_title($title);
$wpdb->query("INSERT INTO $wpdb->posts