Make WordPress Core


Ignore:
Timestamp:
04/28/2009 05:58:45 AM (16 years ago)
Author:
ryan
Message:

s/attribute_escape/attr/. see #9650

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/default-widgets.php

    r11094 r11109  
    6161        //Defaults
    6262        $instance = wp_parse_args( (array) $instance, array( 'sortby' => 'post_title', 'title' => '', 'exclude' => '') );
    63         $title = attribute_escape( $instance['title'] );
    64         $exclude = attribute_escape( $instance['exclude'] );
     63        $title = attr( $instance['title'] );
     64        $exclude = attr( $instance['exclude'] );
    6565    ?>
    6666        <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
     
    211211        if ( $d ) {
    212212?>
    213         <select name="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'> <option value=""><?php echo attribute_escape(__('Select Month')); ?></option> <?php wp_get_archives("type=monthly&format=option&show_post_count=$c"); ?> </select>
     213        <select name="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'> <option value=""><?php echo attr(__('Select Month')); ?></option> <?php wp_get_archives("type=monthly&format=option&show_post_count=$c"); ?> </select>
    214214<?php
    215215        } else {
     
    240240        $dropdown = $instance['dropdown'] ? 'checked="checked"' : '';
    241241?>
    242         <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
     242        <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attr($title); ?>" /></label></p>
    243243        <p>
    244244            <label for="<?php echo $this->get_field_id('count'); ?>"><input class="checkbox" type="checkbox" <?php echo $count; ?> id="<?php echo $this->get_field_id('count'); ?>" name="<?php echo $this->get_field_name('count'); ?>" /> <?php _e('Show post counts'); ?></label>
     
    274274            <?php wp_register(); ?>
    275275            <li><?php wp_loginout(); ?></li>
    276             <li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php echo attribute_escape(__('Syndicate this site using RSS 2.0')); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
    277             <li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php echo attribute_escape(__('The latest comments to all posts in RSS')); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
    278             <li><a href="http://wordpress.org/" title="<?php echo attribute_escape(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>">WordPress.org</a></li>
     276            <li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php echo attr(__('Syndicate this site using RSS 2.0')); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
     277            <li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php echo attr(__('The latest comments to all posts in RSS')); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
     278            <li><a href="http://wordpress.org/" title="<?php echo attr(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>">WordPress.org</a></li>
    279279            <?php wp_meta(); ?>
    280280            </ul>
     
    294294        $title = strip_tags($instance['title']);
    295295?>
    296             <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
     296            <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attr($title); ?>" /></label></p>
    297297<?php
    298298    }
     
    334334        <p><label for="<?php echo $this->get_field_id('title'); ?>">
    335335        <?php _e('Title:'); ?>
    336         <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" />
     336        <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attr($title); ?>" />
    337337        </label></p>
    338338<?php
     
    382382        <p><label for="<?php echo $this->get_field_id('title'); ?>">
    383383        <?php _e('Title:'); ?>
    384         <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" />
     384        <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attr($title); ?>" />
    385385        </label></p>
    386386
     
    464464        //Defaults
    465465        $instance = wp_parse_args( (array) $instance, array( 'title' => '') );
    466         $title = attribute_escape( $instance['title'] );
     466        $title = attr( $instance['title'] );
    467467        $count = (bool) $instance['count'];
    468468        $hierarchical = (bool) $instance['hierarchical'];
     
    567567
    568568    function form( $instance ) {
    569         $title = attribute_escape($instance['title']);
     569        $title = attr($instance['title']);
    570570        if ( !$number = (int) $instance['number'] )
    571571            $number = 5;
     
    654654
    655655    function form( $instance ) {
    656         $title = attribute_escape($instance['title']);
     656        $title = attr($instance['title']);
    657657        if ( !$number = (int) $instance['number'] )
    658658            $number = 5;
     
    703703
    704704        if ( ! is_wp_error($rss) ) {
    705             $desc = attribute_escape(strip_tags(@html_entity_decode($rss->get_description(), ENT_QUOTES, get_option('blog_charset'))));
     705            $desc = attr(strip_tags(@html_entity_decode($rss->get_description(), ENT_QUOTES, get_option('blog_charset'))));
    706706            if ( empty($title) )
    707707                $title = htmlentities(strip_tags($rss->get_title()));
     
    717717        $url = clean_url(strip_tags($url));
    718718        $icon = includes_url('images/rss.png');
    719         $title = "<a class='rsswidget' href='$url' title='" . attribute_escape(__('Syndicate this content')) ."'><img style='background:orange;color:white;border:none;' width='14' height='14' src='$icon' alt='RSS' /></a> <a class='rsswidget' href='$link' title='$desc'>$title</a>";
     719        $title = "<a class='rsswidget' href='$url' title='" . attr(__('Syndicate this content')) ."'><img style='background:orange;color:white;border:none;' width='14' height='14' src='$icon' alt='RSS' /></a> <a class='rsswidget' href='$link' title='$desc'>$title</a>";
    720720
    721721        echo $before_widget;
     
    788788            $link = substr($link, 1);
    789789        $link = clean_url(strip_tags($link));
    790         $title = attribute_escape(strip_tags($item->get_title()));
     790        $title = attr(strip_tags($item->get_title()));
    791791        if ( empty($title) )
    792792            $title = __('Untitled');
    793793
    794         $desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(@html_entity_decode($item->get_description(), ENT_QUOTES, get_option('blog_charset')))));
     794        $desc = str_replace(array("\n", "\r"), ' ', attr(strip_tags(@html_entity_decode($item->get_description(), ENT_QUOTES, get_option('blog_charset')))));
    795795        $desc = wp_html_excerpt( $desc, 360 ) . ' [&hellip;]';
    796796        $desc = wp_specialchars( $desc );
     
    851851    extract( $inputs, EXTR_SKIP);
    852852
    853     $number = attribute_escape( $number );
    854     $title  = attribute_escape( $title );
    855     $url    = attribute_escape( $url );
     853    $number = attr( $number );
     854    $title  = attr( $title );
     855    $url    = attr( $url );
    856856    $items  = (int) $items;
    857857    if ( $items < 1 || 20 < $items )
     
    985985    <p><label for="<?php echo $this->get_field_id('title'); ?>">
    986986    <?php _e('Title:') ?>
    987     <input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo attribute_escape( $instance['title'] ); ?>" />
     987    <input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo attr( $instance['title'] ); ?>" />
    988988    </label></p>
    989989<?php
Note: See TracChangeset for help on using the changeset viewer.