Changeset 62002
- Timestamp:
- 03/13/2026 12:37:55 PM (6 hours ago)
- Location:
- branches/5.1
- Files:
-
- 12 edited
-
. (modified) (1 prop)
-
src/js/_enqueues/wp/util.js (modified) (1 diff)
-
src/wp-admin/includes/class-walker-nav-menu-checklist.php (modified) (1 diff)
-
src/wp-admin/includes/class-walker-nav-menu-edit.php (modified) (4 diffs)
-
src/wp-admin/includes/file.php (modified) (1 diff)
-
src/wp-includes/ID3/getid3.lib.php (modified) (1 diff)
-
src/wp-includes/class-wp-http-ixr-client.php (modified) (1 diff)
-
src/wp-includes/kses.php (modified) (1 diff)
-
src/wp-includes/media.php (modified) (2 diffs)
-
src/wp-includes/nav-menu.php (modified) (1 diff)
-
src/wp-includes/template-loader.php (modified) (1 diff)
-
tests/phpunit/tests/post/nav-menu.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.1
- Property svn:mergeinfo changed
/trunk merged: 61879-61884,61886-61887,61890,61913
- Property svn:mergeinfo changed
-
branches/5.1/src/js/_enqueues/wp/util.js
r43347 r62002 37 37 38 38 return function ( data ) { 39 compiled = compiled || _.template( $( '#tmpl-' + id ).html(), options ); 39 var el = document.querySelector( 'script#tmpl-' + id ); 40 if ( ! el ) { 41 throw new Error( 'Template not found: ' + '#tmpl-' + id ); 42 } 43 compiled = compiled || _.template( $( el ).html(), options ); 40 44 return compiled( data ); 41 45 }; -
branches/5.1/src/wp-admin/includes/class-walker-nav-menu-checklist.php
r43598 r62002 109 109 $output .= '<input type="hidden" class="menu-item-parent-id" name="menu-item[' . $possible_object_id . '][menu-item-parent-id]" value="' . esc_attr( $item->menu_item_parent ) . '" />'; 110 110 $output .= '<input type="hidden" class="menu-item-type" name="menu-item[' . $possible_object_id . '][menu-item-type]" value="' . esc_attr( $item->type ) . '" />'; 111 $output .= '<input type="hidden" class="menu-item-title" name="menu-item[' . $possible_object_id . '][menu-item-title]" value="' . esc_attr( $item->title) . '" />';111 $output .= '<input type="hidden" class="menu-item-title" name="menu-item[' . $possible_object_id . '][menu-item-title]" value="' . htmlspecialchars( $item->title, ENT_QUOTES ) . '" />'; 112 112 $output .= '<input type="hidden" class="menu-item-url" name="menu-item[' . $possible_object_id . '][menu-item-url]" value="' . esc_attr( $item->url ) . '" />'; 113 113 $output .= '<input type="hidden" class="menu-item-target" name="menu-item[' . $possible_object_id . '][menu-item-target]" value="' . esc_attr( $item->target ) . '" />'; 114 $output .= '<input type="hidden" class="menu-item-attr_title" name="menu-item[' . $possible_object_id . '][menu-item-attr _title]" value="' . esc_attr( $item->attr_title) . '" />';115 $output .= '<input type="hidden" class="menu-item-classes" name="menu-item[' . $possible_object_id . '][menu-item-classes]" value="' . esc_attr( implode( ' ', $item->classes )) . '" />';116 $output .= '<input type="hidden" class="menu-item-xfn" name="menu-item[' . $possible_object_id . '][menu-item-xfn]" value="' . esc_attr( $item->xfn) . '" />';114 $output .= '<input type="hidden" class="menu-item-attr_title" name="menu-item[' . $possible_object_id . '][menu-item-attr-title]" value="' . htmlspecialchars( $item->attr_title, ENT_QUOTES ) . '" />'; 115 $output .= '<input type="hidden" class="menu-item-classes" name="menu-item[' . $possible_object_id . '][menu-item-classes]" value="' . htmlspecialchars( implode( ' ', $item->classes ), ENT_QUOTES ) . '" />'; 116 $output .= '<input type="hidden" class="menu-item-xfn" name="menu-item[' . $possible_object_id . '][menu-item-xfn]" value="' . htmlspecialchars( $item->xfn, ENT_QUOTES ) . '" />'; 117 117 } 118 118 -
branches/5.1/src/wp-admin/includes/class-walker-nav-menu-edit.php
r43598 r62002 171 171 <label for="edit-menu-item-title-<?php echo $item_id; ?>"> 172 172 <?php _e( 'Navigation Label' ); ?><br /> 173 <input type="text" id="edit-menu-item-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-title" name="menu-item-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->title); ?>" />173 <input type="text" id="edit-menu-item-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-title" name="menu-item-title[<?php echo $item_id; ?>]" value="<?php echo htmlspecialchars( $item->title, ENT_QUOTES ); ?>" /> 174 174 </label> 175 175 </p> … … 177 177 <label for="edit-menu-item-attr-title-<?php echo $item_id; ?>"> 178 178 <?php _e( 'Title Attribute' ); ?><br /> 179 <input type="text" id="edit-menu-item-attr-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-attr-title" name="menu-item-attr-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->post_excerpt); ?>" />179 <input type="text" id="edit-menu-item-attr-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-attr-title" name="menu-item-attr-title[<?php echo $item_id; ?>]" value="<?php echo htmlspecialchars( $item->post_excerpt, ENT_QUOTES ); ?>" /> 180 180 </label> 181 181 </p> … … 189 189 <label for="edit-menu-item-classes-<?php echo $item_id; ?>"> 190 190 <?php _e( 'CSS Classes (optional)' ); ?><br /> 191 <input type="text" id="edit-menu-item-classes-<?php echo $item_id; ?>" class="widefat code edit-menu-item-classes" name="menu-item-classes[<?php echo $item_id; ?>]" value="<?php echo esc_attr( implode( ' ', $item->classes )); ?>" />191 <input type="text" id="edit-menu-item-classes-<?php echo $item_id; ?>" class="widefat code edit-menu-item-classes" name="menu-item-classes[<?php echo $item_id; ?>]" value="<?php echo htmlspecialchars( implode( ' ', $item->classes ), ENT_QUOTES ); ?>" /> 192 192 </label> 193 193 </p> … … 195 195 <label for="edit-menu-item-xfn-<?php echo $item_id; ?>"> 196 196 <?php _e( 'Link Relationship (XFN)' ); ?><br /> 197 <input type="text" id="edit-menu-item-xfn-<?php echo $item_id; ?>" class="widefat code edit-menu-item-xfn" name="menu-item-xfn[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->xfn); ?>" />197 <input type="text" id="edit-menu-item-xfn-<?php echo $item_id; ?>" class="widefat code edit-menu-item-xfn" name="menu-item-xfn[<?php echo $item_id; ?>]" value="<?php echo htmlspecialchars( $item->xfn, ENT_QUOTES ); ?>" /> 198 198 </label> 199 199 </p> -
branches/5.1/src/wp-admin/includes/file.php
r44635 r62002 1315 1315 } 1316 1316 1317 // Don't extract invalid files: 1318 if ( 0 !== validate_file( $file['filename'] ) ) { 1319 continue; 1320 } 1321 1317 1322 $uncompressed_size += $file['size']; 1318 1323 -
branches/5.1/src/wp-includes/ID3/getid3.lib.php
r41196 r62002 541 541 // https://core.trac.wordpress.org/changeset/29378 542 542 $loader = libxml_disable_entity_loader(true); 543 $XMLobject = simplexml_load_string($XMLstring, 'SimpleXMLElement', LIBXML_NOENT);543 $XMLobject = simplexml_load_string($XMLstring, 'SimpleXMLElement', 0); 544 544 $return = self::SimpleXMLelement2array($XMLobject); 545 545 libxml_disable_entity_loader($loader); -
branches/5.1/src/wp-includes/class-wp-http-ixr-client.php
r42876 r62002 86 86 } 87 87 88 $response = wp_ remote_post( $url, $args );88 $response = wp_safe_remote_post( $url, $args ); 89 89 90 90 if ( is_wp_error( $response ) ) { -
branches/5.1/src/wp-includes/kses.php
r46907 r62002 1728 1728 $string = str_replace( '&', '&', $string ); 1729 1729 1730 // Change back the allowed entities in our entity whitelist1731 1730 $string = preg_replace_callback( '/&([A-Za-z]{2,8}[0-9]{0,2});/', 'wp_kses_named_entities', $string ); 1732 $string = preg_replace_callback( '/&#(0* [0-9]{1,7});/', 'wp_kses_normalize_entities2', $string );1733 $string = preg_replace_callback( '/&#[Xx](0* [0-9A-Fa-f]{1,6});/', 'wp_kses_normalize_entities3', $string );1731 $string = preg_replace_callback( '/&#(0*+[1-9][0-9]{0,6});/', 'wp_kses_normalize_entities2', $string ); 1732 $string = preg_replace_callback( '/&#[Xx](0*+[1-9A-Fa-f][0-9A-Fa-f]{0,5});/', 'wp_kses_normalize_entities3', $string ); 1734 1733 1735 1734 return $string; -
branches/5.1/src/wp-includes/media.php
r56873 r62002 3277 3277 } 3278 3278 3279 if ( $post_parent ) {3279 if ( $post_parent && current_user_can( 'read_post', $attachment->post_parent ) ) { 3280 3280 $parent_type = get_post_type_object( $post_parent->post_type ); 3281 3281 … … 3284 3284 } 3285 3285 3286 if ( $parent_type && current_user_can( 'read_post', $attachment->post_parent )) {3286 if ( $parent_type ) { 3287 3287 $response['uploadedToTitle'] = $post_parent->post_title ? $post_parent->post_title : __( '(no title)' ); 3288 3288 } -
branches/5.1/src/wp-includes/nav-menu.php
r44167 r62002 481 481 } 482 482 483 if ( $args['menu-item-title']== $original_title ) {483 if ( wp_unslash( $args['menu-item-title'] ) === $original_title ) { 484 484 $args['menu-item-title'] = ''; 485 485 } -
branches/5.1/src/wp-includes/template-loader.php
r44524 r62002 74 74 * @param string $template The path of the template to include. 75 75 */ 76 if ( $template = apply_filters( 'template_include', $template ) ) { 77 include( $template ); 76 $template = apply_filters( 'template_include', $template ); 77 $is_stringy = is_string( $template ) || ( is_object( $template ) && method_exists( $template, '__toString' ) ); 78 $template = $is_stringy ? realpath( (string) $template ) : null; 79 if ( 80 is_string( $template ) && 81 ( str_ends_with( $template, '.php' ) || str_ends_with( $template, '.html' ) ) && 82 is_file( $template ) && 83 is_readable( $template ) 84 ) { 85 include $template; 78 86 } elseif ( current_user_can( 'switch_themes' ) ) { 79 87 $theme = wp_get_theme(); -
branches/5.1/tests/phpunit/tests/post/nav-menu.php
r43571 r62002 861 861 } 862 862 } 863 864 863 }
Note: See TracChangeset
for help on using the changeset viewer.