Changeset 47982
- Timestamp:
- 06/10/2020 07:03:59 PM (5 years ago)
- Location:
- branches/4.3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.3/src/wp-admin/includes/media.php
r40464 r47982 2767 2767 if ( preg_match( '#^(audio|video)/#', $post->post_mime_type ) ) { 2768 2768 echo ': ' . __( 'Displayed on attachment pages.' ); 2769 } ?></label> 2770 <?php wp_editor( $post->post_content, 'attachment_content', $editor_args ); ?> 2769 } 2770 2771 ?> 2772 </label> 2773 <?php wp_editor( format_to_edit( $post->post_content ), 'attachment_content', $editor_args ); ?> 2771 2774 2772 2775 </div> -
branches/4.3/src/wp-admin/includes/misc.php
r33468 r47982 414 414 break; 415 415 default: 416 if ( '_page' === substr( $option, -5 ) || 'layout_columns' === $option ) { 417 /** 418 * Filters a screen option value before it is set. 419 * 420 * The filter can also be used to modify non-standard [items]_per_page 421 * settings. See the parent function for a full list of standard options. 422 * 423 * Returning false to the filter will skip saving the current option. 424 * 425 * @since 2.8.0 426 * @since 5.4.2 Only applied to options ending with '_page', 427 * or the 'layout_columns' option. 428 * 429 * @see set_screen_options() 430 * 431 * @param bool $keep Whether to save or skip saving the screen option value. 432 * Default false. 433 * @param string $option The option name. 434 * @param int $value The number of rows to use. 435 */ 436 $value = apply_filters( 'set-screen-option', false, $option, $value ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores 437 } 416 438 417 439 /** 418 440 * Filter a screen option value before it is set. 419 441 * 420 * The filter can also be used to modify non-standard [items]_per_page 421 * settings. See the parent function for a full list of standard options. 442 * The dynamic portion of the hook, `$option`, refers to the option name. 422 443 * 423 444 * Returning false to the filter will skip saving the current option. 424 445 * 425 * @since 2.8.0446 * @since 5.4.2 426 447 * 427 448 * @see set_screen_options() 428 449 * 429 * @param bool|int $value Screen option value. Default false to skip. 430 * @param string $option The option name. 431 * @param int $value The number of rows to use. 450 * @param bool $keep Whether to save or skip saving the screen option value. 451 * Default false. 452 * @param string $option The option name. 453 * @param int $value The number of rows to use. 432 454 */ 433 $value = apply_filters( 'set-screen-option', false, $option, $value );455 $value = apply_filters( "set_screen_option_{$option}", false, $option, $value ); 434 456 435 457 if ( false === $value ) -
branches/4.3/src/wp-admin/themes.php
r33492 r47982 286 286 <?php foreach ( $broken_themes as $broken_theme ) : ?> 287 287 <tr> 288 <td><?php echo $broken_theme->get( 'Name' ) ? $broken_theme->display( 'Name' ) : $broken_theme->get_stylesheet(); ?></td>288 <td><?php echo $broken_theme->get( 'Name' ) ? $broken_theme->display( 'Name' ) : esc_html( $broken_theme->get_stylesheet() ); ?></td> 289 289 <td><?php echo $broken_theme->errors()->get_error_message(); ?></td> 290 290 <?php -
branches/4.3/src/wp-includes/pluggable.php
r46499 r47982 1232 1232 )/x'; 1233 1233 $location = preg_replace_callback( $regex, '_wp_sanitize_utf8_in_redirect', $location ); 1234 $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!*\[\]() ]|i', '', $location);1234 $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!*\[\]()@]|i', '', $location); 1235 1235 $location = wp_kses_no_null($location); 1236 1236 … … 1304 1304 **/ 1305 1305 function wp_validate_redirect($location, $default = '') { 1306 $location = trim( $location, " \t\n\r\0\x08\x0B");1306 $location = wp_sanitize_redirect( trim( $location, " \t\n\r\0\x08\x0B" ) ); 1307 1307 // browsers will assume 'http' is your protocol, and will obey a redirect to a URL starting with '//' 1308 1308 if ( substr($location, 0, 2) == '//' ) -
branches/4.3/tests/phpunit/tests/formatting/redirect.php
r40188 r47982 32 32 $this->assertEquals('http://[2606:2800:220:6d:26bf:1447:aa7]/', wp_sanitize_redirect('http://[2606:2800:220:6d:26bf:1447:aa7]/')); 33 33 $this->assertEquals('http://example.com/search.php?search=(amistillhere)', wp_sanitize_redirect('http://example.com/search.php?search=(amistillhere)')); 34 $this->assertEquals('http://example.com/@username', wp_sanitize_redirect('http://example.com/@username')); 34 35 } 35 36
Note: See TracChangeset
for help on using the changeset viewer.