Changeset 23563 for trunk/wp-admin/includes/ajax-actions.php
- Timestamp:
- 03/01/2013 05:00:25 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/ajax-actions.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ajax-actions.php
r23554 r23563 60 60 } 61 61 62 $s = stripslashes( $_GET['q'] );62 $s = wp_unslash( $_GET['q'] ); 63 63 64 64 $comma = _x( ',', 'tag delimiter' ); … … 573 573 else if ( is_array( $cat_id ) ) 574 574 $cat_id = $cat_id['term_id']; 575 $cat_name = esc_html( stripslashes($cat_name));575 $cat_name = esc_html(wp_unslash($cat_name)); 576 576 $x->add( array( 577 577 'what' => 'link-category', … … 958 958 } else { // Update? 959 959 $mid = (int) key( $_POST['meta'] ); 960 $key = stripslashes( $_POST['meta'][$mid]['key'] );961 $value = stripslashes( $_POST['meta'][$mid]['value'] );960 $key = wp_unslash( $_POST['meta'][$mid]['key'] ); 961 $value = wp_unslash( $_POST['meta'][$mid]['value'] ); 962 962 if ( '' == trim($key) ) 963 963 wp_die( __( 'Please provide a custom field name.' ) ); … … 1228 1228 1229 1229 if ( isset( $_POST['search'] ) ) 1230 $args['s'] = stripslashes( $_POST['search'] );1230 $args['s'] = wp_unslash( $_POST['search'] ); 1231 1231 $args['pagenum'] = ! empty( $_POST['page'] ) ? absint( $_POST['page'] ) : 1; 1232 1232 … … 1329 1329 1330 1330 $post = get_post( $post_ID, ARRAY_A ); 1331 $post = add_magic_quotes($post); //since it is from db1331 $post = wp_slash($post); //since it is from db 1332 1332 1333 1333 $data['content'] = $post['post_content']; … … 1426 1426 unset( $post_types['attachment'] ); 1427 1427 1428 $s = stripslashes( $_POST['ps'] );1428 $s = wp_unslash( $_POST['ps'] ); 1429 1429 $searchand = $search = ''; 1430 1430 $args = array( … … 1891 1891 if ( isset( $changes['alt'] ) ) { 1892 1892 $alt = get_post_meta( $id, '_wp_attachment_image_alt', true ); 1893 $new_alt = stripslashes( $changes['alt'] );1893 $new_alt = wp_unslash( $changes['alt'] ); 1894 1894 if ( $alt != $new_alt ) { 1895 1895 $new_alt = wp_strip_all_tags( $new_alt, true ); … … 1991 1991 check_ajax_referer( 'media-send-to-editor', 'nonce' ); 1992 1992 1993 $attachment = stripslashes_deep( $_POST['attachment'] );1993 $attachment = wp_unslash( $_POST['attachment'] ); 1994 1994 1995 1995 $id = intval( $attachment['id'] ); … … 2046 2046 check_ajax_referer( 'media-send-to-editor', 'nonce' ); 2047 2047 2048 if ( ! $src = stripslashes( $_POST['src'] ) )2048 if ( ! $src = wp_unslash( $_POST['src'] ) ) 2049 2049 wp_send_json_error(); 2050 2050 … … 2055 2055 wp_send_json_error(); 2056 2056 2057 if ( ! $title = trim( stripslashes( $_POST['title'] ) ) )2057 if ( ! $title = trim( wp_unslash( $_POST['title'] ) ) ) 2058 2058 $title = wp_basename( $src ); 2059 2059 … … 2115 2115 2116 2116 if ( ! empty($_POST['data']) ) { 2117 $data = stripslashes_deep( (array) $_POST['data'] );2117 $data = wp_unslash( (array) $_POST['data'] ); 2118 2118 $response = apply_filters( 'heartbeat_nopriv_received', $response, $data, $screen_id ); 2119 2119 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)