Make WordPress Core


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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('"', '"', wptexturize(stripslashes($ak_post_title->post_title)));
     422                $ak_titles_for_day["$ak_post_title->dom"] = str_replace('"', '"', wptexturize($ak_post_title->post_title));
    423423            } else {
    424                 $ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . str_replace('"', '"', wptexturize(stripslashes($ak_post_title->post_title)));
     424                $ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . str_replace('"', '"', wptexturize($ak_post_title->post_title));
    425425            }
    426426        }
Note: See TracChangeset for help on using the changeset viewer.