Changeset 4657

Show
Ignore:
Timestamp:
12/21/06 10:45:58 (2 years ago)
Author:
markjaquith
Message:

Whitespace cleanup for [4656]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.0/wp-admin/admin-functions.php

    r4656 r4657  
    338338function get_user_to_edit($user_id) { 
    339339    $user = new WP_User($user_id); 
    340     $user->user_login = attribute_escape($user->user_login); 
    341     $user->user_email = attribute_escape($user->user_email); 
    342     $user->user_url = attribute_escape($user->user_url); 
    343     $user->first_name = attribute_escape($user->first_name); 
    344     $user->last_name = attribute_escape($user->last_name); 
     340    $user->user_login   = attribute_escape($user->user_login); 
     341    $user->user_email   = attribute_escape($user->user_email); 
     342    $user->user_url     = attribute_escape($user->user_url); 
     343    $user->first_name   = attribute_escape($user->first_name); 
     344    $user->last_name    = attribute_escape($user->last_name); 
    345345    $user->display_name = attribute_escape($user->display_name); 
    346     $user->nickname = attribute_escape($user->nickname); 
    347     $user->aim = attribute_escape($user->aim); 
    348     $user->yim = attribute_escape($user->yim); 
    349     $user->jabber = attribute_escape($user->jabber); 
    350     $user->description = wp_specialchars($user->description); 
     346    $user->nickname     = attribute_escape($user->nickname); 
     347    $user->aim          = attribute_escape($user->aim); 
     348    $user->yim          = attribute_escape($user->yim); 
     349    $user->jabber       = attribute_escape($user->jabber); 
     350    $user->description = wp_specialchars($user->description); 
    351351 
    352352    return $user; 
     
    468468    $link = get_link($link_id); 
    469469 
    470     $link->link_url = attribute_escape($link->link_url); 
    471     $link->link_name = attribute_escape($link->link_name); 
    472     $link->link_image = attribute_escape($link->link_image); 
     470    $link->link_url         = attribute_escape($link->link_url); 
     471    $link->link_name        = attribute_escape($link->link_name); 
     472    $link->link_image       = attribute_escape($link->link_image); 
    473473    $link->link_description = attribute_escape($link->link_description); 
    474     $link->link_notes = wp_specialchars($link->link_notes); 
    475     $link->link_rss = attribute_escape($link->link_rss); 
    476     $link->link_rel = attribute_escape($link->link_rel); 
    477     $link->post_category = $link->link_category; 
     474    $link->link_rss         = attribute_escape($link->link_rss); 
     475    $link->link_rel         = attribute_escape($link->link_rel); 
     476    $link->link_notes       =  wp_specialchars($link->link_notes); 
     477    $link->post_category    = $link->link_category; 
    478478 
    479479    return $link; 
  • branches/2.0/wp-includes/functions-formatting.php

    r4656 r4657  
    10521052} 
    10531053 
    1054 // Escaping for HTML attributes like 
     1054// Escaping for HTML attributes 
    10551055function attribute_escape($text) { 
    10561056    return wp_specialchars($text, true); 
  • trunk/wp-admin/admin-ajax.php

    r4656 r4657  
    142142        $level++; 
    143143    } 
    144     $cat_full_name = attribute_escape( $cat_full_name); 
     144    $cat_full_name = attribute_escape($cat_full_name); 
    145145 
    146146    $x = new WP_Ajax_Response( array( 
  • trunk/wp-admin/admin-functions.php

    r4656 r4657  
    381381function get_user_to_edit( $user_id ) { 
    382382    $user = new WP_User( $user_id ); 
    383     $user->user_login = attribute_escape( $user->user_login); 
    384     $user->user_email = attribute_escape( $user->user_email); 
    385     $user->user_url = attribute_escape( $user->user_url); 
    386     $user->first_name = attribute_escape( $user->first_name); 
    387     $user->last_name = attribute_escape( $user->last_name); 
    388     $user->display_name = attribute_escape( $user->display_name); 
    389     $user->nickname = attribute_escape( $user->nickname); 
    390     $user->aim = attribute_escape( $user->aim); 
    391     $user->yim = attribute_escape( $user->yim); 
    392     $user->jabber = attribute_escape( $user->jabber); 
    393     $user->description = wp_specialchars( $user->description ); 
     383    $user->user_login   = attribute_escape($user->user_login); 
     384    $user->user_email   = attribute_escape($user->user_email); 
     385    $user->user_url     = attribute_escape($user->user_url); 
     386    $user->first_name   = attribute_escape($user->first_name); 
     387    $user->last_name    = attribute_escape($user->last_name); 
     388    $user->display_name = attribute_escape($user->display_name); 
     389    $user->nickname     = attribute_escape($user->nickname); 
     390    $user->aim          = attribute_escape($user->aim); 
     391    $user->yim          = attribute_escape($user->yim); 
     392    $user->jabber       = attribute_escape($user->jabber); 
     393    $user->description =  wp_specialchars($user->description); 
    394394 
    395395    return $user; 
     
    528528    $link = get_link( $link_id ); 
    529529 
    530     $link->link_url = attribute_escape( $link->link_url); 
    531     $link->link_name = attribute_escape( $link->link_name); 
    532     $link->link_image = attribute_escape( $link->link_image); 
    533     $link->link_description = attribute_escape( $link->link_description); 
    534     $link->link_notes = wp_specialchars( $link->link_notes ); 
    535     $link->link_rss = attribute_escape( $link->link_rss); 
    536     $link->link_rel = attribute_escape( $link->link_rel); 
    537     $link->post_category = $link->link_category; 
     530    $link->link_url         = attribute_escape($link->link_url); 
     531    $link->link_name        = attribute_escape($link->link_name); 
     532    $link->link_image       = attribute_escape($link->link_image); 
     533    $link->link_description = attribute_escape($link->link_description); 
     534    $link->link_rss         = attribute_escape($link->link_rss); 
     535    $link->link_rel         = attribute_escape($link->link_rel); 
     536    $link->link_notes       =  wp_specialchars($link->link_notes); 
     537    $link->post_category    = $link->link_category; 
    538538 
    539539    return $link; 
     
    912912 
    913913        $key_js = js_escape( $entry['meta_key'] ); 
    914         $entry['meta_key'] = attribute_escape( $entry['meta_key']); 
    915         $entry['meta_value'] = attribute_escape( $entry['meta_value']); 
     914        $entry['meta_key']   = attribute_escape($entry['meta_key']); 
     915        $entry['meta_value'] = attribute_escape($entry['meta_value']); 
    916916        $r .= "\n\t<tr id='meta-{$entry['meta_id']}' class='$style'>"; 
    917917        $r .= "\n\t\t<td valign='top'><input name='meta[{$entry['meta_id']}][key]' tabindex='6' type='text' size='20' value='{$entry['meta_key']}' /></td>"; 
  • trunk/wp-admin/upload-functions.php

    r4656 r4657  
    88    ob_start(); 
    99        the_title(); 
    10         $post_title = attribute_escape( ob_get_contents()); 
     10        $post_title = attribute_escape(ob_get_contents()); 
    1111    ob_end_clean(); 
    1212    $post_content = apply_filters( 'content_edit_pre', $post->post_content ); 
     
    7272                echo '<a href="' . get_permalink() . '">' . __('view') . '</a>'; 
    7373                echo '&nbsp;|&nbsp;'; 
    74                     echo '<a href="' . attribute_escape( add_query_arg( 'action', 'edit' )) . '" title="' . __('Edit this file') . '">' . __('edit') . '</a>'; 
     74                    echo '<a href="' . attribute_escape(add_query_arg('action', 'edit')) . '" title="' . __('Edit this file') . '">' . __('edit') . '</a>'; 
    7575                echo '&nbsp;|&nbsp;'; 
    76                 echo '<a href="' . attribute_escape( remove_query_arg( array('action', 'ID') )) . '" title="' . __('Browse your files') . '">' . __('cancel') . '</a>'; 
     76                echo '<a href="' . attribute_escape(remove_query_arg(array('action', 'ID'))) . '" title="' . __('Browse your files') . '">' . __('cancel') . '</a>'; 
    7777                echo '&nbsp;]'; ?></span> 
    7878        </div> 
     
    112112                echo '<a href="' . get_permalink() . '">' . __('view') . '</a>'; 
    113113                echo '&nbsp;|&nbsp;'; 
    114                     echo '<a href="' . attribute_escape( add_query_arg( 'action', 'view' )) . '">' . __('links') . '</a>'; 
     114                    echo '<a href="' . attribute_escape(add_query_arg('action', 'view')) . '">' . __('links') . '</a>'; 
    115115                echo '&nbsp;|&nbsp;'; 
    116                 echo '<a href="' . attribute_escape( remove_query_arg( array('action','ID') )) . '" title="' . __('Browse your files') . '">' . __('cancel') . '</a>'; 
     116                echo '<a href="' . attribute_escape(remove_query_arg(array('action','ID'))) . '" title="' . __('Browse your files') . '">' . __('cancel') . '</a>'; 
    117117                echo '&nbsp;]'; ?></span> 
    118118        </div> 
  • trunk/wp-includes/formatting.php

    r4656 r4657  
    10821082} 
    10831083 
    1084 // Escaping for HTML attributes like 
     1084// Escaping for HTML attributes 
    10851085function attribute_escape($text) { 
    10861086    return wp_specialchars($text, true); 
  • trunk/wp-includes/functions.php

    r4656 r4657  
    232232 
    233233function form_option($option) { 
    234     echo attribute_escape( get_option($option)); 
     234    echo attribute_escape(get_option($option)); 
    235235} 
    236236 
     
    11911191            $v = substr(strstr($a, '='), 1); 
    11921192            $k = substr($a, 0, -(strlen($v)+1)); 
    1193             $html .= "\t\t<input type='hidden' name='" . attribute_escape( urldecode($k)) . "' value='" . attribute_escape( urldecode($v)) . "' />\n"; 
     1193            $html .= "\t\t<input type='hidden' name='" . attribute_escape(urldecode($k)) . "' value='" . attribute_escape(urldecode($v)) . "' />\n"; 
    11941194        } 
    11951195        $html .= "\t\t<input type='hidden' name='_wpnonce' value='" . wp_create_nonce($action) . "' />\n"; 
  • trunk/wp-includes/general-template.php

    r4656 r4657  
    902902function the_search_query() { 
    903903    global $s; 
    904     echo attribute_escape( stripslashes($s)); 
     904    echo attribute_escape(stripslashes($s)); 
    905905} 
    906906 
     
    957957        if ( $add_args ) 
    958958            $link = add_query_arg( $add_args, $link ); 
    959         $page_links[] = "<a class='prev page-numbers' href='" . attribute_escape( $link) . "'>$prev_text</a>"; 
     959        $page_links[] = "<a class='prev page-numbers' href='" . attribute_escape($link) . "'>$prev_text</a>"; 
    960960    endif; 
    961961    for ( $n = 1; $n <= $total; $n++ ) : 
     
    969969                if ( $add_args ) 
    970970                    $link = add_query_arg( $add_args, $link ); 
    971                 $page_links[] = "<a class='page-numbers' href='" . attribute_escape( $link) . "'>$n</a>"; 
     971                $page_links[] = "<a class='page-numbers' href='" . attribute_escape($link) . "'>$n</a>"; 
    972972                $dots = true; 
    973973            elseif ( $dots && !$show_all ) : 
     
    982982        if ( $add_args ) 
    983983            $link = add_query_arg( $add_args, $link ); 
    984         $page_links[] = "<a class='next page-numbers' href='" . attribute_escape( $link) . "'>$next_text</a>"; 
     984        $page_links[] = "<a class='next page-numbers' href='" . attribute_escape($link) . "'>$next_text</a>"; 
    985985    endif; 
    986986    switch ( $type ) : 
  • trunk/wp-includes/post-template.php

    r4656 r4657  
    335335        return __('Missing Attachment'); 
    336336 
    337     $post_title = attribute_escape( $_post->post_title); 
     337    $post_title = attribute_escape($_post->post_title); 
    338338 
    339339    if (! empty($_post->guid) ) { 
     
    421421    } 
    422422 
    423     $post_title = attribute_escape( $post->post_title); 
     423    $post_title = attribute_escape($post->post_title); 
    424424 
    425425    $icon = "<img src='$src' title='$post_title' alt='$post_title' $constraint/>"; 
     
    436436    $post = & get_post($id); 
    437437 
    438     $innerHTML = attribute_escape( $post->post_title); 
     438    $innerHTML = attribute_escape($post->post_title); 
    439439 
    440440    return apply_filters('attachment_innerHTML', $innerHTML, $post->ID);