Changeset 23576
- Timestamp:
- 03/01/2013 05:57:08 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ajax-actions.php
r23563 r23576 560 560 if ( !current_user_can( 'manage_categories' ) ) 561 561 wp_die( -1 ); 562 $names = explode(',', $_POST['newcat']);562 $names = explode(',', wp_unslash( $_POST['newcat'] ) ); 563 563 $x = new WP_Ajax_Response(); 564 564 foreach ( $names as $cat_name ) { … … 573 573 else if ( is_array( $cat_id ) ) 574 574 $cat_id = $cat_id['term_id']; 575 $cat_name = esc_html( wp_unslash($cat_name));575 $cat_name = esc_html( $cat_name ); 576 576 $x->add( array( 577 577 'what' => 'link-category', … … 1890 1890 1891 1891 if ( isset( $changes['alt'] ) ) { 1892 $alt = get_post_meta( $id, '_wp_attachment_image_alt', true ); 1893 $new_alt = wp_unslash( $changes['alt'] ); 1894 if ( $alt != $new_alt ) { 1895 $new_alt = wp_strip_all_tags( $new_alt, true ); 1896 update_post_meta( $id, '_wp_attachment_image_alt', addslashes( $new_alt ) ); 1892 $alt = wp_unslash( $changes['alt'] ); 1893 if ( $alt != get_post_meta( $id, '_wp_attachment_image_alt', true ) ) { 1894 $alt = wp_strip_all_tags( $alt, true ); 1895 update_post_meta( $id, '_wp_attachment_image_alt', wp_slash( $alt ) ); 1897 1896 } 1898 1897 } … … 2204 2203 $restoreaction = wp_nonce_url( 2205 2204 add_query_arg( 2206 array( 'revision' => $revision->ID, 2205 array( 'revision' => $revision->ID, 2207 2206 'action' => 'restore' ), 2208 2207 '/wp-admin/revision.php'
Note: See TracChangeset
for help on using the changeset viewer.