WordPress.org

Make WordPress Core

Changeset 7962


Ignore:
Timestamp:
05/20/2008 06:01:43 PM (10 years ago)
Author:
ryan
Message:

Some URL cleaning

Location:
trunk/wp-admin/includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r7911 r7962  
    217217            $sidebar_widget_name = $wp_registered_widget_controls[$widget_id]['name'];
    218218            $params[1] = 'wp_dashboard_trigger_widget_control';
    219             $sidebar_before_widget .= '<form action="' . remove_query_arg( 'edit' )  . '" method="post">';
     219            $sidebar_before_widget .= '<form action="' . clean_url(remove_query_arg( 'edit' ))  . '" method="post">';
    220220            $sidebar_after_widget   = "<div class='dashboard-widget-submit'><input type='hidden' name='sidebar' value='wp_dashboard' /><input type='hidden' name='widget_id' value='$widget_id' /><input type='submit' value='" . __( 'Save' ) . "' /></div></form>$sidebar_after_widget";
    221             $links[] = '<a href="' . remove_query_arg( 'edit' ) . '">' . __( 'Cancel' ) . '</a>';
     221            $links[] = '<a href="' . clean_url(remove_query_arg( 'edit' )) . '">' . __( 'Cancel' ) . '</a>';
    222222        } else {
    223             $links[] = '<a href="' . add_query_arg( 'edit', $widget_id ) . "#$widget_id" . '">' . __( 'Edit' ) . '</a>';
     223            $links[] = '<a href="' . clean_url(add_query_arg( 'edit', $widget_id )) . "#$widget_id" . '">' . __( 'Edit' ) . '</a>';
    224224        }
    225225    }
  • trunk/wp-admin/includes/media.php

    r7961 r7962  
    967967if ( empty($_GET['post_mime_type']) || $_GET['post_mime_type'] == 'all' )
    968968    $class = ' class="current"';
    969 $type_links[] = "<li><a href='" . add_query_arg(array('post_mime_type'=>'all', 'paged'=>false, 'm'=>false)) . "'$class>".__('All Types')."</a>";
     969$type_links[] = "<li><a href='" . clean_url(add_query_arg(array('post_mime_type'=>'all', 'paged'=>false, 'm'=>false))) . "'$class>".__('All Types')."</a>";
    970970foreach ( $post_mime_types as $mime_type => $label ) {
    971971    $class = '';
     
    977977        $class = ' class="current"';
    978978
    979     $type_links[] = "<li><a href='" . add_query_arg(array('post_mime_type'=>$mime_type, 'paged'=>false)) . "'$class>" . sprintf(__ngettext($label[2][0], $label[2][1], $num_posts[$mime_type]), "<span id='$mime_type-counter'>" . number_format_i18n( $num_posts[$mime_type] ) . '</span>') . '</a>';
     979    $type_links[] = "<li><a href='" . clean_url(add_query_arg(array('post_mime_type'=>$mime_type, 'paged'=>false))) . "'$class>" . sprintf(__ngettext($label[2][0], $label[2][1], $num_posts[$mime_type]), "<span id='$mime_type-counter'>" . number_format_i18n( $num_posts[$mime_type] ) . '</span>') . '</a>';
    980980}
    981981echo implode(' | </li>', $type_links) . '</li>';
  • trunk/wp-admin/includes/widgets.php

    r7881 r7962  
    7777                $add_query['add'] = $widget['id'];
    7878                $action = 'add';
    79                 $add_url = wp_nonce_url( add_query_arg( $add_query ), "add-widget_$widget[id]" );
     79                $add_url = clean_url( wp_nonce_url( add_query_arg( $add_query ), "add-widget_$widget[id]" ) );
    8080            } else {
    8181                $action = 'edit';
     
    233233            <?php if ( $edit ) : ?>
    234234
    235             <a class="widget-action widget-control-edit" href="<?php echo remove_query_arg( array( 'edit', 'key' ) ); ?>"><?php _e('Cancel'); ?></a>
     235            <a class="widget-action widget-control-edit" href="<?php echo clean_url( remove_query_arg( array( 'edit', 'key' ) ) ); ?>"><?php _e('Cancel'); ?></a>
    236236
    237237            <?php else : ?>
Note: See TracChangeset for help on using the changeset viewer.