<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[23594] trunk: Use wp_unslash() instead of stripslashes() and stripslashes_deep().</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/23594">23594</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2013-03-03 21:11:40 +0000 (Sun, 03 Mar 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
see <a href="http://core.trac.wordpress.org/ticket/21767">#21767</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesposttemplatephp">trunk/wp-includes/post-template.php</a></li>
<li><a href="#trunkwpincludespostphp">trunk/wp-includes/post.php</a></li>
<li><a href="#trunkwpincludesrevisionphp">trunk/wp-includes/revision.php</a></li>
<li><a href="#trunkwpincludestaxonomyphp">trunk/wp-includes/taxonomy.php</a></li>
<li><a href="#trunkwpincludesuserphp">trunk/wp-includes/user.php</a></li>
<li><a href="#trunkwploginphp">trunk/wp-login.php</a></li>
<li><a href="#trunkwpmailphp">trunk/wp-mail.php</a></li>
<li><a href="#trunkwptrackbackphp">trunk/wp-trackback.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesposttemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/post-template.php (23593 => 23594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post-template.php        2013-03-03 20:55:30 UTC (rev 23593)
+++ trunk/wp-includes/post-template.php        2013-03-03 21:11:40 UTC (rev 23594)
</span><span class="lines">@@ -583,7 +583,7 @@
</span><span class="cx">                 $wp_hasher = new PasswordHash(8, true);
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        $hash = stripslashes( $_COOKIE[ 'wp-postpass_' . COOKIEHASH ] );
</del><ins>+        $hash = wp_unslash( $_COOKIE[ 'wp-postpass_' . COOKIEHASH ] );
</ins><span class="cx">
</span><span class="cx">         return ! $wp_hasher->CheckPassword( $post->post_password, $hash );
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpincludespostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/post.php (23593 => 23594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post.php        2013-03-03 20:55:30 UTC (rev 23593)
+++ trunk/wp-includes/post.php        2013-03-03 21:11:40 UTC (rev 23594)
</span><span class="lines">@@ -360,7 +360,7 @@
</span><span class="cx">                 $more_text = '';
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        // Strip leading and trailing whitespace
</del><ins>+        // ` leading and trailing whitespace
</ins><span class="cx">         $main = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $main);
</span><span class="cx">         $extended = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $extended);
</span><span class="cx">         $more_text = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $more_text);
</span><span class="lines">@@ -2797,7 +2797,7 @@
</span><span class="cx">         // expected_slashed (everything!)
</span><span class="cx">         $data = compact( array( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_parent', 'menu_order', 'guid' ) );
</span><span class="cx">         $data = apply_filters('wp_insert_post_data', $data, $postarr);
</span><del>-        $data = stripslashes_deep( $data );
</del><ins>+        $data = wp_unslash( $data );
</ins><span class="cx">         $where = array( 'ID' => $post_ID );
</span><span class="cx">
</span><span class="cx">         if ( $update ) {
</span><span class="lines">@@ -2810,7 +2810,7 @@
</span><span class="cx">                 }
</span><span class="cx">         } else {
</span><span class="cx">                 if ( isset($post_mime_type) )
</span><del>-                        $data['post_mime_type'] = stripslashes( $post_mime_type ); // This isn't in the update
</del><ins>+                        $data['post_mime_type'] = wp_unslash( $post_mime_type ); // This isn't in the update
</ins><span class="cx">                 // If there is a suggested ID, use it if not already present
</span><span class="cx">                 if ( !empty($import_id) ) {
</span><span class="cx">                         $import_id = (int) $import_id;
</span><span class="lines">@@ -2904,14 +2904,14 @@
</span><span class="cx">         if ( is_object($postarr) ) {
</span><span class="cx">                 // non-escaped post was passed
</span><span class="cx">                 $postarr = get_object_vars($postarr);
</span><del>-                $postarr = add_magic_quotes($postarr);
</del><ins>+                $postarr = wp_slash($postarr);
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         // First, get all of the original fields
</span><span class="cx">         $post = get_post($postarr['ID'], ARRAY_A);
</span><span class="cx">
</span><span class="cx">         // Escape data pulled from DB.
</span><del>-        $post = add_magic_quotes($post);
</del><ins>+        $post = wp_slash($post);
</ins><span class="cx">
</span><span class="cx">         // Passed post category list overwrites existing category list if not empty.
</span><span class="cx">         if ( isset($postarr['post_category']) && is_array($postarr['post_category'])
</span><span class="lines">@@ -3257,7 +3257,7 @@
</span><span class="cx">         $new = implode("\n", $pung);
</span><span class="cx">         $new = apply_filters('add_ping', $new);
</span><span class="cx">         // expected_slashed ($new)
</span><del>-        $new = stripslashes($new);
</del><ins>+        $new = wp_unslash($new);
</ins><span class="cx">         return $wpdb->update( $wpdb->posts, array( 'pinged' => $new ), array( 'ID' => $post_id ) );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3350,7 +3350,7 @@
</span><span class="cx">                 $trackback_urls = explode(',', $tb_list);
</span><span class="cx">                 foreach( (array) $trackback_urls as $tb_url) {
</span><span class="cx">                         $tb_url = trim($tb_url);
</span><del>-                        trackback($tb_url, stripslashes($post_title), $excerpt, $post_id);
</del><ins>+                        trackback($tb_url, wp_unslash($post_title), $excerpt, $post_id);
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="lines">@@ -3694,8 +3694,8 @@
</span><span class="cx">                 $join = " LEFT JOIN $wpdb->postmeta ON ( $wpdb->posts.ID = $wpdb->postmeta.post_id )";
</span><span class="cx">
</span><span class="cx">                 // meta_key and meta_value might be slashed
</span><del>-                $meta_key = stripslashes($meta_key);
-                $meta_value = stripslashes($meta_value);
</del><ins>+                $meta_key = wp_unslash($meta_key);
+                $meta_value = wp_unslash($meta_value);
</ins><span class="cx">                 if ( ! empty( $meta_key ) )
</span><span class="cx">                         $where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_key = %s", $meta_key);
</span><span class="cx">                 if ( ! empty( $meta_value ) )
</span><span class="lines">@@ -3965,7 +3965,7 @@
</span><span class="cx">
</span><span class="cx">         // expected_slashed (everything!)
</span><span class="cx">         $data = compact( array( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_parent', 'menu_order', 'post_mime_type', 'guid' ) );
</span><del>-        $data = stripslashes_deep( $data );
</del><ins>+        $data = wp_unslash( $data );
</ins><span class="cx">
</span><span class="cx">         if ( $update ) {
</span><span class="cx">                 $wpdb->update( $wpdb->posts, $data, array( 'ID' => $post_ID ) );
</span></span></pre></div>
<a id="trunkwpincludesrevisionphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/revision.php (23593 => 23594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/revision.php        2013-03-03 20:55:30 UTC (rev 23593)
+++ trunk/wp-includes/revision.php        2013-03-03 21:11:40 UTC (rev 23594)
</span><span class="lines">@@ -241,7 +241,7 @@
</span><span class="cx">                 return new WP_Error( 'post_type', __( 'Cannot create a revision of a revision' ) );
</span><span class="cx">
</span><span class="cx">         $post = _wp_post_revision_fields( $post, $autosave );
</span><del>-        $post = add_magic_quotes($post); //since data is from db
</del><ins>+        $post = wp_slash($post); //since data is from db
</ins><span class="cx">
</span><span class="cx">         $revision_id = wp_insert_post( $post );
</span><span class="cx">         if ( is_wp_error($revision_id) )
</span><span class="lines">@@ -320,7 +320,7 @@
</span><span class="cx">
</span><span class="cx">         $update['ID'] = $revision['post_parent'];
</span><span class="cx">
</span><del>-        $update = add_magic_quotes( $update ); //since data is from db
</del><ins>+        $update = wp_slash( $update ); //since data is from db
</ins><span class="cx">
</span><span class="cx">         $post_id = wp_update_post( $update );
</span><span class="cx">         if ( is_wp_error( $post_id ) )
</span></span></pre></div>
<a id="trunkwpincludestaxonomyphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/taxonomy.php (23593 => 23594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/taxonomy.php        2013-03-03 20:55:30 UTC (rev 23593)
+++ trunk/wp-includes/taxonomy.php        2013-03-03 21:11:40 UTC (rev 23594)
</span><span class="lines">@@ -959,7 +959,7 @@
</span><span class="cx">                         return false;
</span><span class="cx">         } else if ( 'name' == $field ) {
</span><span class="cx">                 // Assume already escaped
</span><del>-                $value = stripslashes($value);
</del><ins>+                $value = wp_unslash($value);
</ins><span class="cx">                 $field = 't.name';
</span><span class="cx">         } else {
</span><span class="cx">                 $term = get_term( (int) $value, $taxonomy, $output, $filter);
</span><span class="lines">@@ -1499,7 +1499,7 @@
</span><span class="cx">                         return $wpdb->get_var( $wpdb->prepare( $select . $where, $term ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        $term = trim( stripslashes( $term ) );
</del><ins>+        $term = trim( wp_unslash( $term ) );
</ins><span class="cx">
</span><span class="cx">         if ( '' === $slug = sanitize_title($term) )
</span><span class="cx">                 return 0;
</span><span class="lines">@@ -2062,8 +2062,8 @@
</span><span class="cx">         extract($args, EXTR_SKIP);
</span><span class="cx">
</span><span class="cx">         // expected_slashed ($name)
</span><del>-        $name = stripslashes($name);
-        $description = stripslashes($description);
</del><ins>+        $name = wp_unslash($name);
+        $description = wp_unslash($description);
</ins><span class="cx">
</span><span class="cx">         if ( empty($slug) )
</span><span class="cx">                 $slug = sanitize_title($name);
</span><span class="lines">@@ -2445,7 +2445,7 @@
</span><span class="cx">                 return $term;
</span><span class="cx">
</span><span class="cx">         // Escape data pulled from DB.
</span><del>-        $term = add_magic_quotes($term);
</del><ins>+        $term = wp_slash($term);
</ins><span class="cx">
</span><span class="cx">         // Merge old and new args with new args overwriting old ones.
</span><span class="cx">         $args = array_merge($term, $args);
</span><span class="lines">@@ -2456,8 +2456,8 @@
</span><span class="cx">         extract($args, EXTR_SKIP);
</span><span class="cx">
</span><span class="cx">         // expected_slashed ($name)
</span><del>-        $name = stripslashes($name);
-        $description = stripslashes($description);
</del><ins>+        $name = wp_unslash($name);
+        $description = wp_unslash($description);
</ins><span class="cx">
</span><span class="cx">         if ( '' == trim($name) )
</span><span class="cx">                 return new WP_Error('empty_term_name', __('A name is required for this term'));
</span></span></pre></div>
<a id="trunkwpincludesuserphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/user.php (23593 => 23594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/user.php        2013-03-03 20:55:30 UTC (rev 23593)
+++ trunk/wp-includes/user.php        2013-03-03 21:11:40 UTC (rev 23594)
</span><span class="lines">@@ -1390,7 +1390,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         $data = compact( 'user_pass', 'user_email', 'user_url', 'user_nicename', 'display_name', 'user_registered' );
</span><del>-        $data = stripslashes_deep( $data );
</del><ins>+        $data = wp_unslash( $data );
</ins><span class="cx">
</span><span class="cx">         if ( $update ) {
</span><span class="cx">                 $wpdb->update( $wpdb->users, $data, compact( 'ID' ) );
</span><span class="lines">@@ -1504,8 +1504,8 @@
</span><span class="cx"> * @return int The new user's ID.
</span><span class="cx"> */
</span><span class="cx"> function wp_create_user($username, $password, $email = '') {
</span><del>-        $user_login = esc_sql( $username );
-        $user_email = esc_sql( $email );
</del><ins>+        $user_login = wp_slash( $username );
+        $user_email = wp_slash( $email );
</ins><span class="cx">         $user_pass = $password;
</span><span class="cx">
</span><span class="cx">         $userdata = compact('user_login', 'user_email', 'user_pass');
</span></span></pre></div>
<a id="trunkwploginphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-login.php (23593 => 23594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-login.php        2013-03-03 20:55:30 UTC (rev 23593)
+++ trunk/wp-login.php        2013-03-03 21:11:40 UTC (rev 23594)
</span><span class="lines">@@ -399,7 +399,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         // 10 days
</span><del>-        setcookie( 'wp-postpass_' . COOKIEHASH, $wp_hasher->HashPassword( stripslashes( $_POST['post_password'] ) ), time() + 10 * DAY_IN_SECONDS, COOKIEPATH );
</del><ins>+        setcookie( 'wp-postpass_' . COOKIEHASH, $wp_hasher->HashPassword( wp_unslash( $_POST['post_password'] ) ), time() + 10 * DAY_IN_SECONDS, COOKIEPATH );
</ins><span class="cx">
</span><span class="cx">         wp_safe_redirect( wp_get_referer() );
</span><span class="cx">         exit();
</span><span class="lines">@@ -434,7 +434,7 @@
</span><span class="cx">         do_action('lost_password');
</span><span class="cx">         login_header(__('Lost Password'), '<p class="message">' . __('Please enter your username or email address. You will receive a link to create a new password via email.') . '</p>', $errors);
</span><span class="cx">
</span><del>-        $user_login = isset($_POST['user_login']) ? stripslashes($_POST['user_login']) : '';
</del><ins>+        $user_login = isset($_POST['user_login']) ? wp_unslash($_POST['user_login']) : '';
</ins><span class="cx">
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="lines">@@ -550,11 +550,11 @@
</span><span class="cx"> <form name="registerform" id="registerform" action="<?php echo esc_url( site_url('wp-login.php?action=register', 'login_post') ); ?>" method="post">
</span><span class="cx">         <p>
</span><span class="cx">                 <label for="user_login"><?php _e('Username') ?><br />
</span><del>-                <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(stripslashes($user_login)); ?>" size="20" /></label>
</del><ins>+                <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(wp_unslash($user_login)); ?>" size="20" /></label>
</ins><span class="cx">         </p>
</span><span class="cx">         <p>
</span><span class="cx">                 <label for="user_email"><?php _e('E-mail') ?><br />
</span><del>-                <input type="text" name="user_email" id="user_email" class="input" value="<?php echo esc_attr(stripslashes($user_email)); ?>" size="25" /></label>
</del><ins>+                <input type="text" name="user_email" id="user_email" class="input" value="<?php echo esc_attr(wp_unslash($user_email)); ?>" size="25" /></label>
</ins><span class="cx">         </p>
</span><span class="cx"> <?php do_action('register_form'); ?>
</span><span class="cx">         <p id="reg_passmail"><?php _e('A password will be e-mailed to you.') ?></p>
</span><span class="lines">@@ -670,7 +670,7 @@
</span><span class="cx">         login_header(__('Log In'), '', $errors);
</span><span class="cx">
</span><span class="cx">         if ( isset($_POST['log']) )
</span><del>-                $user_login = ( 'incorrect_password' == $errors->get_error_code() || 'empty_password' == $errors->get_error_code() ) ? esc_attr(stripslashes($_POST['log'])) : '';
</del><ins>+                $user_login = ( 'incorrect_password' == $errors->get_error_code() || 'empty_password' == $errors->get_error_code() ) ? esc_attr(wp_unslash($_POST['log'])) : '';
</ins><span class="cx">         $rememberme = ! empty( $_POST['rememberme'] );
</span><span class="cx"> ?>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpmailphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-mail.php (23593 => 23594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-mail.php        2013-03-03 20:55:30 UTC (rev 23593)
+++ trunk/wp-mail.php        2013-03-03 21:11:40 UTC (rev 23594)
</span><span class="lines">@@ -202,7 +202,7 @@
</span><span class="cx">         $post_category = array(get_option('default_email_category'));
</span><span class="cx">
</span><span class="cx">         $post_data = compact('post_content','post_title','post_date','post_date_gmt','post_author','post_category', 'post_status');
</span><del>-        $post_data = add_magic_quotes($post_data);
</del><ins>+        $post_data = wp_slash($post_data);
</ins><span class="cx">
</span><span class="cx">         $post_ID = wp_insert_post($post_data);
</span><span class="cx">         if ( is_wp_error( $post_ID ) )
</span></span></pre></div>
<a id="trunkwptrackbackphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-trackback.php (23593 => 23594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-trackback.php        2013-03-03 20:55:30 UTC (rev 23593)
+++ trunk/wp-trackback.php        2013-03-03 21:11:40 UTC (rev 23594)
</span><span class="lines">@@ -45,9 +45,9 @@
</span><span class="cx"> $charset = isset($_POST['charset']) ? $_POST['charset'] : '';
</span><span class="cx">
</span><span class="cx"> // These three are stripslashed here so that they can be properly escaped after mb_convert_encoding()
</span><del>-$title = isset($_POST['title']) ? stripslashes($_POST['title']) : '';
-$excerpt = isset($_POST['excerpt']) ? stripslashes($_POST['excerpt']) : '';
-$blog_name = isset($_POST['blog_name']) ? stripslashes($_POST['blog_name']) : '';
</del><ins>+$title = isset($_POST['title']) ? wp_unslash($_POST['title']) : '';
+$excerpt = isset($_POST['excerpt']) ? wp_unslash($_POST['excerpt']) : '';
+$blog_name = isset($_POST['blog_name']) ? wp_unslash($_POST['blog_name']) : '';
</ins><span class="cx">
</span><span class="cx"> if ($charset)
</span><span class="cx">         $charset = str_replace( array(',', ' '), '', strtoupper( trim($charset) ) );
</span><span class="lines">@@ -65,9 +65,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Now that mb_convert_encoding() has been given a swing, we need to escape these three
</span><del>-$title = $wpdb->escape($title);
-$excerpt = $wpdb->escape($excerpt);
-$blog_name = $wpdb->escape($blog_name);
</del><ins>+$title = wp_slash($title);
+$excerpt = wp_slash($excerpt);
+$blog_name = wp_slash($blog_name);
</ins><span class="cx">
</span><span class="cx"> if ( is_single() || is_page() )
</span><span class="cx">         $tb_id = $posts[0]->ID;
</span></span></pre>
</div>
</div>
</body>
</html>