Ticket #24248: 24248-raw-context.diff
File 24248-raw-context.diff, 1.2 KB (added by , 11 years ago) |
---|
-
post.php
3096 3096 return 0; 3097 3097 } 3098 3098 3099 $guid = get_post_field( 'guid', $post_ID );3100 $previous_status = get_post_field( 'post_status', $post_ID);3099 $guid = get_post_field( 'guid', $post_ID, 'raw' ); 3100 $previous_status = get_post_field( 'post_status', $post_ID, 'raw' ); 3101 3101 } else { 3102 3102 $previous_status = 'new'; 3103 3103 } … … 3179 3179 } else { 3180 3180 // On updates, we need to check to see if it's using the old, fixed sanitization context. 3181 3181 $check_name = sanitize_title( $post_name, '', 'old-save' ); 3182 if ( $update && strtolower( urlencode( $post_name ) ) == $check_name && get_post_field( 'post_name', $post_ID ) == $check_name ) {3182 if ( $update && strtolower( urlencode( $post_name ) ) == $check_name && get_post_field( 'post_name', $post_ID, 'raw' ) == $check_name ) { 3183 3183 $post_name = $check_name; 3184 3184 } else { // new post, or slug has changed. 3185 3185 $post_name = sanitize_title($post_name); … … 3389 3389 } 3390 3390 } 3391 3391 3392 $current_guid = get_post_field( 'guid', $post_ID );3392 $current_guid = get_post_field( 'guid', $post_ID, 'raw' ); 3393 3393 3394 3394 // Set GUID. 3395 3395 if ( ! $update && '' == $current_guid ) {