Make WordPress Core


Ignore:
Timestamp:
08/20/2007 10:50:04 PM (19 years ago)
Author:
ryan
Message:

bookmark sanitizer funcs and default filter cleanup. see #4546

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/link-manager.php

    r5676 r5906  
    8181$select_cat .= '<option value="all"'  . (($cat_id == 'all') ? " selected='selected'" : '') . '>' . __('All') . "</option>\n";
    8282foreach ((array) $categories as $cat)
    83     $select_cat .= '<option value="' . $cat->term_id . '"' . (($cat->term_id == $cat_id) ? " selected='selected'" : '') . '>' . wp_specialchars(apply_filters('link_category', $cat->name)) . "</option>\n";
     83    $select_cat .= '<option value="' . $cat->term_id . '"' . (($cat->term_id == $cat_id) ? " selected='selected'" : '') . '>' . sanitize_term_field('name', $cat->name, $cat->term_id, 'link_category', 'display') . "</option>\n";
    8484$select_cat .= "</select>\n";
    8585
     
    132132<?php
    133133    foreach ($links as $link) {
    134         $link->link_name = attribute_escape(apply_filters('link_title', $link->link_name));
    135         $link->link_description = wp_specialchars(apply_filters('link_description', $link->link_description));
    136         $link->link_url = clean_url($link->link_url);
     134        $link = sanitize_bookmark($link);
     135        $link->link_name = attribute_escape($link->link_name);
    137136        $link->link_category = wp_get_link_cats($link->link_id);
    138137        $short_url = str_replace('http://', '', $link->link_url);
     
    160159                    $cat_names = array();
    161160                    foreach ($link->link_category as $category) {
    162                         $cat = get_term($category, 'link_category');
    163                         $cat_name = wp_specialchars(apply_filters('link_category', $cat->name));
     161                        $cat = get_term($category, 'link_category', OBJECT, 'display');
     162                        $cat_name = $cat->name;
    164163                        if ( $cat_id != $category )
    165164                            $cat_name = "<a href='link-manager.php?cat_id=$category'>$cat_name</a>";
Note: See TracChangeset for help on using the changeset viewer.