Changeset 54558
- Timestamp:
- 10/17/2022 06:00:49 PM (2 years ago)
- Location:
- branches/4.4
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.4
- Property svn:mergeinfo changed
/trunk merged: 54521-54523,54525-54527,54529-54530,54541
- Property svn:mergeinfo changed
-
branches/4.4/src/wp-includes/comment.php
r44850 r54558 1909 1909 } 1910 1910 1911 $filter_comment = false; 1912 if ( ! has_filter( 'pre_comment_content', 'wp_filter_kses' ) ) { 1913 $filter_comment = ! user_can( isset( $comment['user_id'] ) ? $comment['user_id'] : 0, 'unfiltered_html' ); 1914 } 1915 1916 if ( $filter_comment ) { 1917 add_filter( 'pre_comment_content', 'wp_filter_kses' ); 1918 } 1919 1911 1920 // Escape data pulled from DB. 1912 1921 $comment = wp_slash($comment); … … 1918 1927 1919 1928 $commentarr = wp_filter_comment( $commentarr ); 1929 1930 if ( $filter_comment ) { 1931 remove_filter( 'pre_comment_content', 'wp_filter_kses' ); 1932 } 1920 1933 1921 1934 // Now extract the merged array. -
branches/4.4/src/wp-includes/customize/class-wp-customize-header-image-control.php
r35389 r54558 108 108 109 109 <button type="button" class="choice thumbnail" 110 data-customize-image-value="{{ {data.header.url}}}"110 data-customize-image-value="{{data.header.url}}" 111 111 data-customize-header-image-data="{{JSON.stringify(data.header)}}"> 112 112 <span class="screen-reader-text"><?php _e( 'Set image' ); ?></span> 113 <img src="{{ {data.header.thumbnail_url}}}" alt="{{{data.header.alt_text || data.header.description}}}">113 <img src="{{data.header.thumbnail_url}}" alt="{{data.header.alt_text || data.header.description}}" /> 114 114 </button> 115 115 -
branches/4.4/src/wp-includes/date.php
r34989 r54558 153 153 public function __construct( $date_query, $default_column = 'post_date' ) { 154 154 155 if ( isset( $date_query['relation'] ) && 'OR' === strtoupper( $date_query['relation'] )) {156 $this->relation = 'OR';155 if ( isset( $date_query['relation'] ) ) { 156 $this->relation = $this->sanitize_relation( $date_query['relation'] ); 157 157 } else { 158 158 $this->relation = 'AND'; … … 233 233 $this->validate_date_values( $queries ); 234 234 } 235 236 // Sanitize the relation parameter. 237 $queries['relation'] = $this->sanitize_relation( $queries['relation'] ); 235 238 236 239 foreach ( $queries as $key => $q ) { … … 1012 1015 return $wpdb->prepare( "DATE_FORMAT( $column, %s ) $compare %f", $format, $time ); 1013 1016 } 1017 1018 /** 1019 * Sanitizes a 'relation' operator. 1020 * 1021 * @since 6.0.3 1022 * 1023 * @param string $relation Raw relation key from the query argument. 1024 * @return string Sanitized relation ('AND' or 'OR'). 1025 */ 1026 public function sanitize_relation( $relation ) { 1027 if ( 'OR' === strtoupper( $relation ) ) { 1028 return 'OR'; 1029 } else { 1030 return 'AND'; 1031 } 1032 } 1014 1033 } -
branches/4.4/src/wp-includes/functions.php
r46498 r54558 2524 2524 } else { 2525 2525 $html = __( 'Are you sure you want to do this?' ); 2526 if ( wp_get_referer() ) 2527 $html .= "</p><p><a href='" . esc_url( remove_query_arg( 'updated', wp_get_referer() ) ) . "'>" . __( 'Please try again.' ) . "</a>"; 2526 if ( wp_get_referer() ) { 2527 $wp_http_referer = remove_query_arg( 'updated', wp_get_referer() ); 2528 $wp_http_referer = wp_validate_redirect( esc_url_raw( $wp_http_referer ) ); 2529 $html .= '</p><p>'; 2530 $html .= sprintf( 2531 '<a href="%s">%s</a>', 2532 esc_url( $wp_http_referer ), 2533 __( 'Please try again.' ) 2534 ); 2535 } 2528 2536 } 2529 2537 -
branches/4.4/src/wp-includes/media-template.php
r35567 r54558 1246 1246 <img id="preview-favicon" src="{{ data.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/> 1247 1247 </div> 1248 <span class="browser-title"><?php bloginfo( 'name'); ?></span>1248 <span class="browser-title"><?php echo esc_js( get_bloginfo( 'name' ) ); ?></span> 1249 1249 </div> 1250 1250 -
branches/4.4/src/wp-includes/pluggable.php
r47972 r54558 368 368 $phpmailer->ClearCustomHeaders(); 369 369 $phpmailer->ClearReplyTos(); 370 $phpmailer->Body = ''; 371 $phpmailer->AltBody = ''; 370 372 371 373 // From email and name -
branches/4.4/src/wp-includes/widgets.php
r36148 r54558 1222 1222 if ( is_wp_error($rss) ) { 1223 1223 if ( is_admin() || current_user_can('manage_options') ) 1224 echo '<p>' . sprintf( __('<strong>RSS Error</strong>: %s'), $rss->get_error_message() ) . '</p>';1224 echo '<p>' . sprintf( __('<strong>RSS Error</strong>: %s'), esc_html( $rss->get_error_message() ) ) . '</p>'; 1225 1225 return; 1226 1226 } … … 1331 1331 1332 1332 if ( ! empty( $args['error'] ) ) { 1333 echo '<p class="widget-error"><strong>' . sprintf( __( 'RSS Error: %s' ), $args['error']) . '</strong></p>';1333 echo '<p class="widget-error"><strong>' . sprintf( __( 'RSS Error: %s' ), esc_html( $args['error'] ) ) . '</strong></p>'; 1334 1334 } 1335 1335 -
branches/4.4/src/wp-mail.php
r39776 r54558 60 60 wp_die( __('There doesn’t seem to be any new mail.') ); 61 61 } 62 63 // Always run as an unauthenticated user. 64 wp_set_current_user( 0 ); 62 65 63 66 for ( $i = 1; $i <= $count; $i++ ) { … … 126 129 $author = sanitize_email($author); 127 130 if ( is_email($author) ) { 128 echo '<p>' . sprintf(__('Author is %s'), $author) . '</p>';129 131 $userdata = get_user_by('email', $author); 130 132 if ( ! empty( $userdata ) ) { -
branches/4.4/src/wp-trackback.php
r30662 r54558 13 13 wp( array( 'tb' => '1' ) ); 14 14 } 15 16 // Always run as an unauthenticated user. 17 wp_set_current_user( 0 ); 15 18 16 19 /**
Note: See TracChangeset
for help on using the changeset viewer.