Make WordPress Core


Ignore:
Timestamp:
05/29/2007 04:37:35 AM (19 years ago)
Author:
markjaquith
Message:

Int casting and misc escaping for 2.2 Props g30rg3x. fixes #4333 for 2.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/wp-admin/admin-functions.php

    r5453 r5589  
    348348
    349349        $post->post_password = format_to_edit( $post->post_password );
     350       
     351        $post->menu_order = (int) $post->menu_order;
    350352
    351353        if ( $post->post_type == 'page' )
    … …  
    397399function get_comment_to_edit( $id ) {
    398400        $comment = get_comment( $id );
     401       
     402        $comment->comment_ID = (int) $comment->comment_ID;
     403        $comment->comment_post_ID = (int) $comment->comment_post_ID;
    399404
    400405        $comment->comment_content = format_to_edit( $comment->comment_content, user_can_richedit() );
    401406        $comment->comment_content = apply_filters( 'comment_edit_pre', $comment->comment_content);
     407        $comment->comment_content = apply_filters( 'comment_text', $comment->comment_content );
    402408
    403409        $comment->comment_author = format_to_edit( $comment->comment_author );
    404410        $comment->comment_author_email = format_to_edit( $comment->comment_author_email );
     411        $comment->comment_author_url = clean_url($comment->comment_author_url);
    405412        $comment->comment_author_url = format_to_edit( $comment->comment_author_url );
    406413
    … …  
    410417function get_category_to_edit( $id ) {
    411418        $category = get_category( $id );
     419       
     420        $category->term_id = (int) $category->term_id;
     421        $category->parent = (int) $category->parent;
    412422
    413423        return $category;
    … …  
    10271037                $entry['meta_key']   = attribute_escape($entry['meta_key']);
    10281038                $entry['meta_value'] = attribute_escape($entry['meta_value']);
     1039                $entry['meta_id'] = (int) $entry['meta_id'];
    10291040                $r .= "\n\t<tr id='meta-{$entry['meta_id']}' class='$style'>";
    10301041                $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>";
    … …  
    10791090
    10801091        foreach ( $keys as $key ) {
    1081                 $key = attribute_escape( $key);
     1092                $key = attribute_escape( $key );
    10821093                echo "\n\t<option value='$key'>$key</option>";
    10831094        }
Note: See TracChangeset for help on using the changeset viewer.