Changeset 61955
- Timestamp:
- 03/12/2026 02:15:58 AM (42 hours ago)
- Location:
- branches/5.5
- Files:
-
- 13 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) (2 diffs)
-
tools/local-env/scripts/install.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.5
- Property svn:mergeinfo changed
/trunk merged: 61879-61885,61887,61890,61913
- Property svn:mergeinfo changed
-
branches/5.5/src/js/_enqueues/wp/util.js
r48650 r61955 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.5/src/wp-admin/includes/class-walker-nav-menu-checklist.php
r47808 r61955 112 112 $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 ) . '" />'; 113 113 $output .= '<input type="hidden" class="menu-item-type" name="menu-item[' . $possible_object_id . '][menu-item-type]" value="' . esc_attr( $item->type ) . '" />'; 114 $output .= '<input type="hidden" class="menu-item-title" name="menu-item[' . $possible_object_id . '][menu-item-title]" value="' . esc_attr( $item->title) . '" />';114 $output .= '<input type="hidden" class="menu-item-title" name="menu-item[' . $possible_object_id . '][menu-item-title]" value="' . htmlspecialchars( $item->title, ENT_QUOTES ) . '" />'; 115 115 $output .= '<input type="hidden" class="menu-item-url" name="menu-item[' . $possible_object_id . '][menu-item-url]" value="' . esc_attr( $item->url ) . '" />'; 116 116 $output .= '<input type="hidden" class="menu-item-target" name="menu-item[' . $possible_object_id . '][menu-item-target]" value="' . esc_attr( $item->target ) . '" />'; 117 $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) . '" />';118 $output .= '<input type="hidden" class="menu-item-classes" name="menu-item[' . $possible_object_id . '][menu-item-classes]" value="' . esc_attr( implode( ' ', $item->classes )) . '" />';119 $output .= '<input type="hidden" class="menu-item-xfn" name="menu-item[' . $possible_object_id . '][menu-item-xfn]" value="' . esc_attr( $item->xfn) . '" />';117 $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 ) . '" />'; 118 $output .= '<input type="hidden" class="menu-item-classes" name="menu-item[' . $possible_object_id . '][menu-item-classes]" value="' . htmlspecialchars( implode( ' ', $item->classes ), ENT_QUOTES ) . '" />'; 119 $output .= '<input type="hidden" class="menu-item-xfn" name="menu-item[' . $possible_object_id . '][menu-item-xfn]" value="' . htmlspecialchars( $item->xfn, ENT_QUOTES ) . '" />'; 120 120 } 121 121 -
branches/5.5/src/wp-admin/includes/class-walker-nav-menu-edit.php
r48076 r61955 193 193 <label for="edit-menu-item-title-<?php echo $item_id; ?>"> 194 194 <?php _e( 'Navigation Label' ); ?><br /> 195 <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); ?>" />195 <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 ); ?>" /> 196 196 </label> 197 197 </p> … … 199 199 <label for="edit-menu-item-attr-title-<?php echo $item_id; ?>"> 200 200 <?php _e( 'Title Attribute' ); ?><br /> 201 <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); ?>" />201 <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 ); ?>" /> 202 202 </label> 203 203 </p> … … 211 211 <label for="edit-menu-item-classes-<?php echo $item_id; ?>"> 212 212 <?php _e( 'CSS Classes (optional)' ); ?><br /> 213 <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 )); ?>" />213 <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 ); ?>" /> 214 214 </label> 215 215 </p> … … 217 217 <label for="edit-menu-item-xfn-<?php echo $item_id; ?>"> 218 218 <?php _e( 'Link Relationship (XFN)' ); ?><br /> 219 <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); ?>" />219 <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 ); ?>" /> 220 220 </label> 221 221 </p> -
branches/5.5/src/wp-admin/includes/file.php
r48746 r61955 1658 1658 } 1659 1659 1660 // Don't extract invalid files: 1661 if ( 0 !== validate_file( $file['filename'] ) ) { 1662 continue; 1663 } 1664 1660 1665 $uncompressed_size += $file['size']; 1661 1666 -
branches/5.5/src/wp-includes/ID3/getid3.lib.php
r48278 r61955 724 724 // https://core.trac.wordpress.org/changeset/29378 725 725 $loader = libxml_disable_entity_loader(true); 726 $XMLobject = simplexml_load_string($XMLstring, 'SimpleXMLElement', LIBXML_NOENT);726 $XMLobject = simplexml_load_string($XMLstring, 'SimpleXMLElement', 0); 727 727 $return = self::SimpleXMLelement2array($XMLobject); 728 728 libxml_disable_entity_loader($loader); -
branches/5.5/src/wp-includes/class-wp-http-ixr-client.php
r48586 r61955 89 89 } 90 90 91 $response = wp_ remote_post( $url, $args );91 $response = wp_safe_remote_post( $url, $args ); 92 92 93 93 if ( is_wp_error( $response ) ) { -
branches/5.5/src/wp-includes/kses.php
r48573 r61955 1801 1801 $string = preg_replace_callback( '/&([A-Za-z]{2,8}[0-9]{0,2});/', 'wp_kses_named_entities', $string ); 1802 1802 } 1803 $string = preg_replace_callback( '/&#(0*[ 0-9]{1,7});/', 'wp_kses_normalize_entities2', $string );1804 $string = preg_replace_callback( '/&#[Xx](0*[ 0-9A-Fa-f]{1,6});/', 'wp_kses_normalize_entities3', $string );1803 $string = preg_replace_callback( '/&#(0*[1-9][0-9]{0,6});/', 'wp_kses_normalize_entities2', $string ); 1804 $string = preg_replace_callback( '/&#[Xx](0*[1-9A-Fa-f][0-9A-Fa-f]{0,5});/', 'wp_kses_normalize_entities3', $string ); 1805 1805 1806 1806 return $string; -
branches/5.5/src/wp-includes/media.php
r56880 r61955 3813 3813 } 3814 3814 3815 if ( $post_parent ) {3815 if ( $post_parent && current_user_can( 'read_post', $attachment->post_parent ) ) { 3816 3816 $parent_type = get_post_type_object( $post_parent->post_type ); 3817 3817 … … 3820 3820 } 3821 3821 3822 if ( $parent_type && current_user_can( 'read_post', $attachment->post_parent )) {3822 if ( $parent_type ) { 3823 3823 $response['uploadedToTitle'] = $post_parent->post_title ? $post_parent->post_title : __( '(no title)' ); 3824 3824 } -
branches/5.5/src/wp-includes/nav-menu.php
r48620 r61955 493 493 } 494 494 495 if ( wp_unslash( $args['menu-item-title'] ) === wp_specialchars_decode( $original_title )) {495 if ( wp_unslash( $args['menu-item-title'] ) === $original_title ) { 496 496 $args['menu-item-title'] = ''; 497 497 } -
branches/5.5/src/wp-includes/template-loader.php
r47855 r61955 102 102 * @param string $template The path of the template to include. 103 103 */ 104 $template = apply_filters( 'template_include', $template ); 105 if ( $template ) { 104 $template = apply_filters( 'template_include', $template ); 105 $is_stringy = is_string( $template ) || ( is_object( $template ) && method_exists( $template, '__toString' ) ); 106 $template = $is_stringy ? realpath( (string) $template ) : null; 107 if ( 108 is_string( $template ) && 109 ( str_ends_with( $template, '.php' ) || str_ends_with( $template, '.html' ) ) && 110 is_file( $template ) && 111 is_readable( $template ) 112 ) { 106 113 include $template; 107 114 } elseif ( current_user_can( 'switch_themes' ) ) { -
branches/5.5/tests/phpunit/tests/post/nav-menu.php
r48439 r61955 974 974 ); 975 975 976 $this->assertSame( 'Test Cat - "Pre-Slashed" Cat Name & >', $category->name ); 977 976 978 $category_item_id = wp_update_nav_menu_item( 977 979 $this->menu_id, … … 982 984 'menu-item-object-id' => $category->term_id, 983 985 'menu-item-status' => 'publish', 984 /* 985 * Interestingly enough, if we use `$cat->name` for the menu item title, 986 * we won't be able to replicate the bug because it's in htmlentities form. 987 */ 988 'menu-item-title' => $category_name, 986 'menu-item-title' => $category->name, 989 987 ) 990 988 ); -
branches/5.5/tools/local-env/scripts/install.js
r60759 r61955 38 38 wp_cli( 'db reset --yes' ); 39 39 wp_cli( `core install --title="WordPress Develop" --admin_user=admin --admin_password=password --admin_email=test@test.com --skip-email --url=http://localhost:${process.env.LOCAL_PORT}` ); 40 wp_cli( `rewrite structure '/%year%/%monthnum%/%postname%/'` ); 40 41 } ); 41 42
Note: See TracChangeset
for help on using the changeset viewer.