Make WordPress Core

Changeset 1435


Ignore:
Timestamp:
06/18/2004 12:22:09 AM (22 years ago)
Author:
rboren
Message:

stripslashes() elimination. Remove extra slashes during upgrade. Bugs 0000059 and 0000018

Location:
trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-functions.php

    r1432 r1435  
    8181   $result[$cat]['cat_ID'] = $cat;
    8282   $result[$cat]['checked'] = in_array($cat, $checked_categories);
    83    $result[$cat]['cat_name'] = stripslashes(get_the_category_by_ID($cat));
     83   $result[$cat]['cat_name'] = get_the_category_by_ID($cat);
    8484 }
    8585
  • trunk/wp-admin/link-categories.php

    r1429 r1435  
    8888    $cat_id = $_GET['cat_id'];
    8989    $cat_name=get_linkcatname($cat_id);
    90     $cat_name=addslashes($cat_name);
    9190
    9291    if ($cat_id=="1")
     
    133132<tr>
    134133    <th width="33%" scope="row"><?php _e('Name:') ?></th>
    135     <td width="67%"><input name="cat_name" type="text" value="<?php echo stripslashes($row->cat_name)?>" size="30" /></td>
     134    <td width="67%"><input name="cat_name" type="text" value="<?php echo $row->cat_name?>" size="30" /></td>
    136135</tr>
    137136<tr>
     
    191190<tr>
    192191    <th width="33%" scope="row"><?php _e('Before Link:') ?></th>
    193     <td width="67%"><input type="text" name="text_before_link" size="45" value="<?php echo htmlspecialchars(stripslashes($row->text_before_link))?>" /></td>
     192    <td width="67%"><input type="text" name="text_before_link" size="45" value="<?php echo htmlspecialchars($row->text_before_link)?>" /></td>
    194193</tr>
    195194<tr>
    196195<th scope="row"><?php _e('Between Link and Description:') ?></th>
    197 <td><input type="text" name="text_after_link" size="45" value="<?php echo htmlspecialchars(stripslashes($row->text_after_link))?>" /></td>
     196<td><input type="text" name="text_after_link" size="45" value="<?php echo htmlspecialchars($row->text_after_link)?>" /></td>
    198197</tr>
    199198<tr>
    200199<th scope="row"><?php _e('After Link:') ?></th>
    201 <td><input type="text" name="text_after_all" size="45" value="<?php echo htmlspecialchars(stripslashes($row->text_after_all))?>"/></td>
     200<td><input type="text" name="text_after_all" size="45" value="<?php echo htmlspecialchars($row->text_after_all)?>"/></td>
    202201</tr>
    203202</table>
     
    224223    $cat_id=$_POST["cat_id"];
    225224
    226     $cat_name=addslashes(stripslashes($_POST["cat_name"]));
     225    $cat_name= $_POST["cat_name"];
    227226    $auto_toggle = $_POST["auto_toggle"];
    228227    if ($auto_toggle != 'Y') {
     
    334333?>
    335334              <tr valign="middle" align="center" <?php echo $style ?> style="border-bottom: 1px dotted #9C9A9C;">
    336                 <td><?php echo stripslashes($row->cat_name)?></td>
     335                <td><?php echo $row->cat_name?></td>
    337336                <td ><?php echo $row->cat_id?></td>
    338337                <td><?php echo $row->auto_toggle?></td>
  • trunk/wp-admin/link-manager.php

    r1417 r1435  
    313313
    314314    if ($row) {
    315       $link_url = stripslashes($row->link_url);
    316       $link_name = stripslashes($row->link_name);
     315      $link_url = $row->link_url;
     316      $link_name = $row->link_name;
    317317      $link_image = $row->link_image;
    318318      $link_target = $row->link_target;
    319319      $link_category = $row->link_category;
    320       $link_description = stripslashes($row->link_description);
     320      $link_description = $row->link_description;
    321321      $link_visible = $row->link_visible;
    322322      $link_rating = $row->link_rating;
    323       $link_rel = stripslashes($row->link_rel);
    324       $link_notes = stripslashes($row->link_notes);
     323      $link_rel = $row->link_rel;
     324      $link_notes = $row->link_notes;
    325325      $link_rss_uri = $row->link_rss;
    326326    }
     
    691691    if ($links) {
    692692        foreach ($links as $link) {
    693             $short_url = str_replace('http://', '', stripslashes($link->link_url));
     693            $short_url = str_replace('http://', '', $link->link_url);
    694694            $short_url = str_replace('www.', '', $short_url);
    695695            if ('/' == substr($short_url, -1))
     
    698698                $short_url =  substr($short_url, 0, 32).'...';
    699699
    700             $link->link_name = stripslashes($link->link_name);
    701             $link->category = stripslashes($link->category);
    702             $link->link_rel = stripslashes($link->link_rel);
    703             $link->link_description = stripslashes($link->link_description);
    704700            $image = ($link->link_image != null) ? __('Yes') : __('No');
    705701            $visible = ($link->link_visible == 'Y') ? __('Yes') : __('No');
  • trunk/wp-admin/menu.php

    r1429 r1435  
    4141    <li><a href="<?php echo get_settings('home') . '/' . get_settings('blogfilename'); ?>" title="<?php _e('View your site') ?>"><?php _e('View site') ?> &raquo;</a></li>
    4242    <li class="last"><a href="<?php echo get_settings('siteurl')
    43      ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php printf(__('Logout (%s)'), stripslashes($user_nickname)) ?></a></li>
     43     ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php printf(__('Logout (%s)'), $user_nickname) ?></a></li>
    4444</ul>
  • trunk/wp-admin/options.php

    r1429 r1435  
    7676            // should we even bother checking?
    7777            if ($user_level >= $option->option_admin_level) {
    78                 $old_val = stripslashes($option->option_value);
     78                $old_val = $option->option_value;
    7979                $new_val = $_POST[$option->option_name];
    8080                if (!$new_val) {
  • trunk/wp-admin/profile.php

    r1422 r1435  
    8484    }
    8585
    86     $newuser_firstname=addslashes(stripslashes($_POST['newuser_firstname']));
    87     $newuser_lastname=addslashes(stripslashes($_POST['newuser_lastname']));
    88     $newuser_nickname=addslashes(stripslashes($_POST['newuser_nickname']));
     86    $newuser_firstname=$_POST['newuser_firstname'];
     87    $newuser_lastname=$_POST['newuser_lastname'];
     88    $newuser_nickname=$_POST['newuser_nickname'];
    8989    $newuser_nicename=sanitize_title($newuser_nickname);
    90     $newuser_icq=addslashes(stripslashes($_POST['newuser_icq']));
    91     $newuser_aim=addslashes(stripslashes($_POST['newuser_aim']));
    92     $newuser_msn=addslashes(stripslashes($_POST['newuser_msn']));
    93     $newuser_yim=addslashes(stripslashes($_POST['newuser_yim']));
    94     $newuser_email=addslashes(stripslashes($_POST['newuser_email']));
    95     $newuser_url=addslashes(stripslashes($_POST['newuser_url']));
     90    $newuser_icq=$_POST['newuser_icq'];
     91    $newuser_aim=$_POST['newuser_aim'];
     92    $newuser_msn=$_POST['newuser_msn'];
     93    $newuser_yim=$_POST['newuser_yim'];
     94    $newuser_email=$_POST['newuser_email'];
     95    $newuser_url=$_POST['newuser_url'];
    9696    $newuser_url = preg_match('/^(https?|ftps?|mailto|news|gopher):/is', $newuser_url) ? $newuser_url : 'http://' . $newuser_url;
    97     $newuser_idmode=addslashes(stripslashes($_POST['newuser_idmode']));
    98     $user_description = addslashes(stripslashes($_POST['user_description']));
     97    $newuser_idmode=$_POST['newuser_idmode'];
     98    $user_description = $_POST['user_description'];
    9999
    100100    $query = "UPDATE $wpdb->users SET user_firstname='$newuser_firstname', $updatepassword user_lastname='$newuser_lastname', user_nickname='$newuser_nickname', user_icq='$newuser_icq', user_email='$newuser_email', user_url='$newuser_url', user_aim='$newuser_aim', user_msn='$newuser_msn', user_yim='$newuser_yim', user_idmode='$newuser_idmode', user_description = '$user_description', user_nicename = '$newuser_nicename' WHERE ID = $user_ID";
  • trunk/wp-admin/upgrade-functions.php

    r1429 r1435  
    8989    }
    9090    return $all_options;
     91}
     92
     93function deslash($content) {
     94    // Note: \\\ inside a regex denotes a single backslash.
     95
     96    // Replace one or more backslashes followed by a single quote with
     97    // a single quote.
     98    $content = preg_replace("/\\\+'/", "'", $content);
     99
     100    // Replace one or more backslashes followed by a double quote with
     101    // a double quote.
     102    $content = preg_replace('/\\\+"/', '"', $content);
     103
     104    // Replace one or more backslashes with one backslash.
     105    $content = preg_replace("/\\\+/", "\\", $content);
     106
     107    return $content;
    91108}
    92109
     
    872889        $wpdb->query("UPDATE $wpdb->options SET `autoload` = 'no' WHERE option_name = '$fatoption'");
    873890    endforeach;
     891
     892    // Remove extraneous backslashes.
     893    $posts = $wpdb->get_results("SELECT ID, post_title, post_content, post_excerpt FROM $wpdb->posts");
     894    if ($posts) {
     895        foreach($posts as $post) {
     896            $post_content = addslashes(deslash($post->post_content));
     897            $post_title = addslashes(deslash($post->post_title));
     898            $post_excerpt = addslashes(deslash($post->post_excerpt));
     899            $wpdb->query("UPDATE $wpdb->posts SET post_title = '$post_title', post_content = '$post_content', post_excerpt = '$post_excerpt' WHERE ID = '$post->ID'");
     900        }
     901    }
     902
     903    // Remove extraneous backslashes.
     904    $comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_content FROM $wpdb->comments");
     905    if ($comments) {
     906        foreach($comments as $comment) {
     907            $comment_content = addslashes(deslash($comment->comment_content));
     908            $comment_author = addslashes(deslash($comment->comment_author));
     909            $wpdb->query("UPDATE $wpdb->comments SET comment_content = '$comment_content', comment_author = '$comment_author' WHERE comment_ID = '$comment->comment_ID'");
     910        }
     911    }
    874912}
    875913
  • trunk/wp-admin/users.php

    r1422 r1435  
    7171    }
    7272
    73     $user_login = addslashes(stripslashes($user_login));
    74     $pass1 = addslashes(stripslashes($pass1));
    75     $user_nickname = addslashes(stripslashes($user_nickname));
    7673    $user_nicename = sanitize_title($user_nickname);
    77     $user_firstname = addslashes(stripslashes($user_firstname));
    78     $user_lastname = addslashes(stripslashes($user_lastname));
    79     $user_uri = addslashes(stripslashes($user_uri));
    8074    $user_uri = preg_match('/^(https?|ftps?|mailto|news|gopher):/is', $user_uri) ? $user_uri : 'http://' . $user_uri;
    8175    $now = gmdate('Y-m-d H:i:s');
     
    9690    }
    9791
     92    $user_login = stripslashes($user_login);
    9893    $message  = 'New user registration on your blog ' . get_settings('blogname') . ":\r\n\r\n";
    9994    $message .= "Login: $user_login\r\n\r\nE-mail: $user_email";
     
    205200        $email = $user_data->user_email;
    206201        $url = $user_data->user_url;
    207         $short_url = str_replace('http://', '', stripslashes($url));
     202        $short_url = str_replace('http://', '', $url);
    208203        $short_url = str_replace('www.', '', $short_url);
    209204        if ('/' == substr($short_url, -1))
     
    256251        $email = $user_data->user_email;
    257252        $url = $user_data->user_url;
    258         $short_url = str_replace('http://', '', stripslashes($url));
     253        $short_url = str_replace('http://', '', $url);
    259254        $short_url = str_replace('www.', '', $short_url);
    260255        if ('/' == substr($short_url, -1))
  • trunk/wp-includes/functions-formatting.php

    r1409 r1435  
    5151
    5252function clean_pre($text) {
    53     $text = stripslashes($text);
    5453    $text = str_replace('<br />', '', $text);
    5554    return $text;
  • trunk/wp-includes/functions.php

    r1428 r1435  
    167167    global $wpdb, $cache_userdata;
    168168    if ( empty($cache_userdata[$userid]) ) {
    169         $user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID = '$userid'");
    170         $user->user_nickname = stripslashes($user->user_nickname);
    171         $user->user_firstname = stripslashes($user->user_firstname);
    172         $user->user_lastname = stripslashes($user->user_lastname);
    173         $user->user_description = stripslashes($user->user_description);
    174         $cache_userdata[$userid] = $user;
    175     } else {
    176         $user = $cache_userdata[$userid];
    177     }
    178     return $user;
     169        $cache_userdata[$userid] =
     170            $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID = '$userid'");
     171    }
     172
     173    return $cache_userdata[$userid];
    179174}
    180175
     
    316311            if ('home' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value);
    317312            if ('category_base' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value);
    318             $all_options->{$option->option_name} = stripslashes($option->option_value);
     313            $all_options->{$option->option_name} = $option->option_value;
    319314        }
    320315    }
     
    324319function update_option($option_name, $newvalue) {
    325320    global $wpdb, $cache_settings;
    326     $newvalue = stripslashes($newvalue);
     321    $newvalue = $newvalue;
    327322    $newvalue = trim($newvalue); // I can't think of any situation we wouldn't want to trim
    328323    $newvalue = $wpdb->escape($newvalue);
     
    517512function trackback($trackback_url, $title, $excerpt, $ID) {
    518513    global $wpdb;
    519     $title = urlencode(stripslashes($title));
    520     $excerpt = urlencode(stripslashes($excerpt));
    521     $blog_name = urlencode(stripslashes(get_settings('blogname')));
     514    $title = urlencode($title);
     515    $excerpt = urlencode($excerpt);
     516    $blog_name = urlencode(get_settings('blogname'));
    522517    $tb_url = $trackback_url;
    523518    $url = urlencode(get_permalink($ID));
     
    933928    $comment_author_domain = gethostbyaddr($comment->comment_author_IP);
    934929
    935     $blogname = stripslashes(get_settings('blogname'));
     930    $blogname = get_settings('blogname');
    936931   
    937932    if ('comment' == $comment_type) {
    938         $notify_message  = "New comment on your post #$comment->comment_post_ID \"".stripslashes($post->post_title)."\"\r\n\r\n";
     933        $notify_message  = "New comment on your post #$comment->comment_post_ID \"".$post->post_title."\"\r\n\r\n";
    939934        $notify_message .= "Author : $comment->comment_author (IP: $comment->comment_author_IP , $comment_author_domain)\r\n";
    940935        $notify_message .= "E-mail : $comment->comment_author_email\r\n";
    941936        $notify_message .= "URI    : $comment->comment_author_url\r\n";
    942937        $notify_message .= "Whois  : http://ws.arin.net/cgi-bin/whois.pl?queryinput=$comment->comment_author_IP\r\n";
    943         $notify_message .= "Comment:\r\n".stripslashes($comment->comment_content)."\r\n\r\n";
     938        $notify_message .= "Comment:\r\n".$comment->comment_content."\r\n\r\n";
    944939        $notify_message .= "You can see all comments on this post here: \r\n";
    945         $subject = '[' . $blogname . '] Comment: "' .stripslashes($post->post_title).'"';
     940        $subject = '[' . $blogname . '] Comment: "' .$post->post_title.'"';
    946941    } elseif ('trackback' == $comment_type) {
    947         $notify_message  = "New trackback on your post #$comment_post_ID \"".stripslashes($post->post_title)."\"\r\n\r\n";
     942        $notify_message  = "New trackback on your post #$comment_post_ID \"".$post->post_title."\"\r\n\r\n";
    948943        $notify_message .= "Website: $comment->comment_author (IP: $comment->comment_author_IP , $comment_author_domain)\r\n";
    949944        $notify_message .= "URI    : $comment->comment_author_url\r\n";
    950         $notify_message .= "Excerpt: \n".stripslashes($comment->comment_content)."\r\n\r\n";
     945        $notify_message .= "Excerpt: \n".$comment->comment_content."\r\n\r\n";
    951946        $notify_message .= "You can see all trackbacks on this post here: \r\n";
    952         $subject = '[' . $blogname . '] Trackback: "' .stripslashes($post->post_title).'"';
     947        $subject = '[' . $blogname . '] Trackback: "' .$post->post_title.'"';
    953948    } elseif ('pingback' == $comment_type) {
    954         $notify_message  = "New pingback on your post #$comment_post_ID \"".stripslashes($post->post_title)."\"\r\n\r\n";
     949        $notify_message  = "New pingback on your post #$comment_post_ID \"".$post->post_title."\"\r\n\r\n";
    955950        $notify_message .= "Website: $comment->comment_author\r\n";
    956951        $notify_message .= "URI    : $comment->comment_author_url\r\n";
    957952        $notify_message .= "Excerpt: \n[...] $original_context [...]\r\n\r\n";
    958953        $notify_message .= "You can see all pingbacks on this post here: \r\n";
    959         $subject = '[' . $blogname . '] Pingback: "' .stripslashes($post->post_title).'"';
     954        $subject = '[' . $blogname . '] Pingback: "' .$post->post_title.'"';
    960955    }
    961956    $notify_message .= get_permalink($comment->comment_post_ID) . '#comments';
     
    964959        $from = "From: \"$blogname\" <wordpress@" . $_SERVER['SERVER_NAME'] . '>';
    965960    } else {
    966         $from = 'From: "' . stripslashes($comment->comment_author) . "\" <$comment->comment_author_email>";
     961        $from = 'From: "' . $comment->comment_author . "\" <$comment->comment_author_email>";
    967962    }
    968963
     
    992987    $comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'");
    993988
    994     $notify_message  = "A new comment on the post #$comment->comment_post_ID \"".stripslashes($post->post_title)."\" is waiting for your approval\r\n\r\n";
     989    $notify_message  = "A new comment on the post #$comment->comment_post_ID \"".$post->post_title."\" is waiting for your approval\r\n\r\n";
    995990    $notify_message .= "Author : $comment->comment_author (IP: $comment->comment_author_IP , $comment_author_domain)\r\n";
    996991    $notify_message .= "E-mail : $comment->comment_author_email\r\n";
    997992    $notify_message .= "URL    : $comment->comment_author_url\r\n";
    998993    $notify_message .= "Whois  : http://ws.arin.net/cgi-bin/whois.pl?queryinput=$comment->comment_author_IP\r\n";
    999     $notify_message .= "Comment:\r\n".stripslashes($comment->comment_content)."\r\n\r\n";
     994    $notify_message .= "Comment:\r\n".$comment->comment_content."\r\n\r\n";
    1000995    $notify_message .= "To approve this comment, visit: " . get_settings('siteurl') . "/wp-admin/post.php?action=mailapprovecomment&p=".$comment->comment_post_ID."&comment=$comment_id\r\n";
    1001996    $notify_message .= "To delete this comment, visit: " . get_settings('siteurl') . "/wp-admin/post.php?action=confirmdeletecomment&p=".$comment->comment_post_ID."&comment=$comment_id\r\n";
     
    1003998    $notify_message .= get_settings('siteurl') . "/wp-admin/moderation.php\r\n";
    1004999
    1005     $subject = '[' . stripslashes(get_settings('blogname')) . '] Please approve: "' .stripslashes($post->post_title).'"';
     1000    $subject = '[' . get_settings('blogname') . '] Please approve: "' .$post->post_title.'"';
    10061001    $admin_email = get_settings("admin_email");
    10071002    $from  = "From: $admin_email";
  • trunk/wp-includes/links.php

    r1355 r1435  
    177177        $the_link = '#';
    178178        if (($row->link_url != null) && ($row->link_url != '')) {
    179             $the_link = htmlspecialchars(stripslashes($row->link_url));
    180         }
    181         $rel = stripslashes($row->link_rel);
     179            $the_link = htmlspecialchars($row->link_url);
     180        }
     181        $rel = $row->link_rel;
    182182        if ($rel != '') {
    183183            $rel = " rel='$rel'";
    184184        }
    185         $desc = htmlspecialchars(stripslashes($row->link_description), ENT_QUOTES);
    186         $name = htmlspecialchars(stripslashes($row->link_name), ENT_QUOTES);
     185        $desc = htmlspecialchars($row->link_description, ENT_QUOTES);
     186        $name = htmlspecialchars($row->link_name, ENT_QUOTES);
    187187
    188188        $title = $desc;
     
    274274 ** $links = get_linkobjectsbyname('fred');
    275275 ** foreach ($links as $link) {
    276  **   echo '<li>'.stripslashes($link->link_name).'</li>';
     276 **   echo '<li>'.$link->link_name.'</li>';
    277277 ** }
    278278 **/
     
    351351    if ($results) {
    352352        foreach ($results as $result) {
    353             $result->link_url         = stripslashes($result->link_url);
    354             $result->link_name        = stripslashes($result->link_name);
    355             $result->link_description = stripslashes($result->link_description);
    356             $result->link_notes       = stripslashes($result->link_notes);
     353            $result->link_url         = $result->link_url;
     354            $result->link_name        = $result->link_name;
     355            $result->link_description = $result->link_description;
     356            $result->link_notes       = $result->link_notes;
    357357            $newresults[] = $result;
    358358        }
     
    465465        $cat_name = $wpdb->get_var("SELECT cat_name FROM $wpdb->linkcategories WHERE cat_id=$id");
    466466    }
    467     return stripslashes($cat_name);
     467    return $cat_name;
    468468}
    469469
     
    560560
    561561            // Display the category name
    562             echo '  <li id="'.sanitize_title($cat['cat_name']).'">' . stripslashes($cat['cat_name']) . "\n\t<ul>\n";
     562            echo '  <li id="'.sanitize_title($cat['cat_name']).'">' . $cat['cat_name'] . "\n\t<ul>\n";
    563563            // Call get_links() with all the appropriate params
    564564            get_links($cat['link_category'],
  • trunk/wp-includes/template-functions-author.php

    r1355 r1435  
    7373    global $id, $authordata;
    7474
    75     echo '<a href="' . get_author_link(0, $authordata->ID, $authordata->user_nicename) . '" title="' . sprintf(__("Posts by %s"), htmlspecialchars(the_author($idmode, false))) . '">' . stripslashes(the_author($idmode, false)) . '</a>';
     75    echo '<a href="' . get_author_link(0, $authordata->ID, $authordata->user_nicename) . '" title="' . sprintf(__("Posts by %s"), htmlspecialchars(the_author($idmode, false))) . '">' . the_author($idmode, false) . '</a>';
    7676}
    7777
     
    144144            if (! $hide_empty) echo $name;
    145145        } else {
    146             $link = '<a href="' . get_author_link(0, $author->ID, $author->user_nicename) . '" title="' . sprintf(__("Posts by %s"), htmlspecialchars($author->user_nickname)) . '">' . stripslashes($name) . '</a>';
     146            $link = '<a href="' . get_author_link(0, $author->ID, $author->user_nicename) . '" title="' . sprintf(__("Posts by %s"), htmlspecialchars($author->user_nickname)) . '">' . $name . '</a>';
    147147
    148148            if ( (! empty($feed_image)) || (! empty($feed)) ) {
     
    157157
    158158                if (! empty($feed)) {
    159                     $title =  ' title="' . stripslashes($feed) . '"';
    160                     $alt = ' alt="' . stripslashes($feed) . '"';
    161                     $name = stripslashes($feed);
     159                    $title =  ' title="' . $feed . '"';
     160                    $alt = ' alt="' . $feed . '"';
     161                    $name = $feed;
    162162                    $link .= $title;
    163163                }
  • trunk/wp-includes/template-functions-category.php

    r1429 r1435  
    6969        $thelist .= '<ul class="post-categories">';
    7070        foreach ($categories as $category) {
    71             $category->cat_name = stripslashes($category->cat_name);
     71            $category->cat_name = $category->cat_name;
    7272            $thelist .= "\n\t<li>";
    7373            switch(strtolower($parents)) {
     
    9494        $i = 0;
    9595        foreach ($categories as $category) {
    96             $category->cat_name = stripslashes($category->cat_name);
     96            $category->cat_name = $category->cat_name;
    9797            if (0 < $i) $thelist .= $seperator . ' ';
    9898            switch(strtolower($parents)) {
     
    118118    $the_list = '';
    119119    foreach ($categories as $category) {
    120         $category->cat_name = stripslashes(convert_chars($category->cat_name));
     120        $category->cat_name = convert_chars($category->cat_name);
    121121        if ('rdf' == $type) {
    122122            $the_list .= "\n\t<dc:subject>$category->cat_name</dc:subject>";
     
    136136        $cat_name = $cache_categories[$cat_ID]->cat_name;
    137137    }
    138     return(stripslashes($cat_name));
     138    return($cat_name);
    139139}
    140140
     
    243243                echo ' selected="selected"';
    244244            echo '>';
    245             echo stripslashes($cat_name);
     245            echo $cat_name;
    246246            if (intval($optioncount) == 1) echo '&nbsp;&nbsp;('.$category->cat_count.')';
    247247            if (intval($optiondates) == 1) echo '&nbsp;&nbsp;'.$category->lastday.'/'.$category->lastmonth;
     
    360360            }
    361361            $link .= '>';
    362             $link .= apply_filters('list_cats', stripslashes($category->cat_name)).'</a>';
     362            $link .= apply_filters('list_cats', $category->cat_name).'</a>';
    363363
    364364            if ( (! empty($feed_image)) || (! empty($feed)) ) {
     
    373373
    374374                if ( !empty($feed) ) {
    375                     $title =  ' title="' . stripslashes($feed) . '"';
    376                     $alt = ' alt="' . stripslashes($feed) . '"';
    377                     $name = stripslashes($feed);
     375                    $title =  ' title="' . $feed . '"';
     376                    $alt = ' alt="' . $feed . '"';
     377                    $name = $feed;
    378378                    $link .= $title;
    379379                }
  • trunk/wp-includes/template-functions-comment.php

    r1405 r1435  
    161161    $email = apply_filters('comment_email', $comment->comment_author_email);
    162162    if ((!empty($email)) && ($email != '@')) {
    163     $display = ($linktext != '') ? $linktext : stripslashes($email);
     163    $display = ($linktext != '') ? $linktext : $email;
    164164        echo $before;
    165165        echo "<a href='mailto:$email'>$display</a>";
     
    173173
    174174    if ((!empty($url)) && ($url != 'http://') && ($url != 'http://url')) {
    175     $display = ($linktext != '') ? $linktext : stripslashes($url);
     175    $display = ($linktext != '') ? $linktext : $url;
    176176        echo "$before<a href='$url' rel='external'>$display</a>$after";
    177177    }
  • trunk/wp-includes/template-functions-general.php

    r1430 r1435  
    7373    if(!empty($cat)) {
    7474        if (!stristr($cat,'-')) { // category excluded
    75             $title = stripslashes(get_the_category_by_ID($cat));
     75            $title = get_the_category_by_ID($cat);
    7676        }
    7777    }
    7878    if (!empty($category_name)) {
    79         $title = stripslashes($wpdb->get_var("SELECT cat_name FROM $wpdb->categories WHERE category_nicename = '$category_name'"));
     79        $title = $wpdb->get_var("SELECT cat_name FROM $wpdb->categories WHERE category_nicename = '$category_name'");
    8080    }
    8181
     
    9999    // If there's a post
    100100    if ($single) {
    101         $title = strip_tags(stripslashes($posts[0]->post_title));
     101        $title = strip_tags($posts[0]->post_title);
    102102        $title = apply_filters('single_post_title', $title);
    103103    }
     
    121121        $title = apply_filters('single_post_title', $title);
    122122        if ($display) {
    123             echo $prefix.strip_tags(stripslashes($title));
     123            echo $prefix.strip_tags($title);
    124124        } else {
    125             return strip_tags(stripslashes($title));
     125            return strip_tags($title);
    126126        }
    127127    }
     
    134134        if(!empty($my_cat_name)) {
    135135            if ($display)
    136                 echo $prefix.strip_tags(stripslashes($my_cat_name));
     136                echo $prefix.strip_tags($my_cat_name);
    137137            else
    138                 return strip_tags(stripslashes($my_cat_name));
     138                return strip_tags($my_cat_name);
    139139        }
    140140    }
     
    268268                if ($arcresult->post_date != '0000-00-00 00:00:00') {
    269269                    $url  = get_permalink($arcresult->ID);
    270                     $arc_title = stripslashes($arcresult->post_title);
     270                    $arc_title = $arcresult->post_title;
    271271                    if ($arc_title) {
    272272                        $text = strip_tags($arc_title);
     
    420420            }
    421421            if (empty($ak_titles_for_day["$ak_post_title->dom"])) { // first one
    422                 $ak_titles_for_day["$ak_post_title->dom"] = str_replace('"', '&quot;', wptexturize(stripslashes($ak_post_title->post_title)));
     422                $ak_titles_for_day["$ak_post_title->dom"] = str_replace('"', '&quot;', wptexturize($ak_post_title->post_title));
    423423            } else {
    424                 $ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . str_replace('"', '&quot;', wptexturize(stripslashes($ak_post_title->post_title)));
     424                $ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . str_replace('"', '&quot;', wptexturize($ak_post_title->post_title));
    425425            }
    426426        }
  • trunk/wp-includes/template-functions-links.php

    r1395 r1435  
    256256            $string = '<a href="'.get_permalink($lastpost->ID).'">'.$previous;
    257257            if ($title == 'yes') {
    258                 $string .= wptexturize(stripslashes($lastpost->post_title));
     258                $string .= wptexturize($lastpost->post_title);
    259259            }
    260260            $string .= '</a>';
     
    294294            $string = '<a href="'.get_permalink($nextpost->ID).'">'.$next;
    295295            if ($title=='yes') {
    296                 $string .= wptexturize(stripslashes($nextpost->post_title));
     296                $string .= wptexturize($nextpost->post_title);
    297297            }
    298298            $string .= '</a>';
  • trunk/wp-includes/version.php

    r1362 r1435  
    33// This just holds the version number, in a separate file so we can bump it without cluttering the CVS
    44
    5 $wp_version = '1.3-pre-alpha';
     5$wp_version = '1.3-alpha';
    66
    77?>
Note: See TracChangeset for help on using the changeset viewer.