Changeset 61903
- Timestamp:
- 03/10/2026 04:40:01 PM (3 days ago)
- Location:
- branches/6.6
- Files:
-
- 15 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-block-patterns-registry.php (modified) (2 diffs)
-
src/wp-includes/class-wp-http-ixr-client.php (modified) (1 diff)
-
src/wp-includes/html-api/class-wp-html-tag-processor.php (modified) (1 diff)
-
src/wp-includes/interactivity-api/class-wp-interactivity-api.php (modified) (1 diff)
-
src/wp-includes/kses.php (modified) (1 diff)
-
src/wp-includes/media.php (modified) (1 diff)
-
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)
Legend:
- Unmodified
- Added
- Removed
-
branches/6.6
- Property svn:mergeinfo changed
/trunk merged: 61879-61890
- Property svn:mergeinfo changed
-
branches/6.6/src/js/_enqueues/wp/util.js
r54241 r61903 37 37 38 38 return function ( data ) { 39 if ( ! document.getElementById( 'tmpl-' + id ) ) { 39 var el = document.querySelector( 'script#tmpl-' + id ); 40 if ( ! el ) { 40 41 throw new Error( 'Template not found: ' + '#tmpl-' + id ); 41 42 } 42 compiled = compiled || _.template( $( '#tmpl-' + id ).html(),options );43 compiled = compiled || _.template( $( el ).html(), options ); 43 44 return compiled( data ); 44 45 }; -
branches/6.6/src/wp-admin/includes/class-walker-nav-menu-checklist.php
r56547 r61903 117 117 $output .= '<input type="hidden" class="menu-item-parent-id" name="menu-item[' . $possible_object_id . '][menu-item-parent-id]" value="' . esc_attr( $menu_item->menu_item_parent ) . '" />'; 118 118 $output .= '<input type="hidden" class="menu-item-type" name="menu-item[' . $possible_object_id . '][menu-item-type]" value="' . esc_attr( $menu_item->type ) . '" />'; 119 $output .= '<input type="hidden" class="menu-item-title" name="menu-item[' . $possible_object_id . '][menu-item-title]" value="' . esc_attr( $menu_item->title) . '" />';119 $output .= '<input type="hidden" class="menu-item-title" name="menu-item[' . $possible_object_id . '][menu-item-title]" value="' . htmlspecialchars( $menu_item->title, ENT_QUOTES ) . '" />'; 120 120 $output .= '<input type="hidden" class="menu-item-url" name="menu-item[' . $possible_object_id . '][menu-item-url]" value="' . esc_attr( $menu_item->url ) . '" />'; 121 121 $output .= '<input type="hidden" class="menu-item-target" name="menu-item[' . $possible_object_id . '][menu-item-target]" value="' . esc_attr( $menu_item->target ) . '" />'; 122 $output .= '<input type="hidden" class="menu-item-attr-title" name="menu-item[' . $possible_object_id . '][menu-item-attr-title]" value="' . esc_attr( $menu_item->attr_title) . '" />';123 $output .= '<input type="hidden" class="menu-item-classes" name="menu-item[' . $possible_object_id . '][menu-item-classes]" value="' . esc_attr( implode( ' ', $menu_item->classes )) . '" />';124 $output .= '<input type="hidden" class="menu-item-xfn" name="menu-item[' . $possible_object_id . '][menu-item-xfn]" value="' . esc_attr( $menu_item->xfn) . '" />';122 $output .= '<input type="hidden" class="menu-item-attr-title" name="menu-item[' . $possible_object_id . '][menu-item-attr-title]" value="' . htmlspecialchars( $menu_item->attr_title, ENT_QUOTES ) . '" />'; 123 $output .= '<input type="hidden" class="menu-item-classes" name="menu-item[' . $possible_object_id . '][menu-item-classes]" value="' . htmlspecialchars( implode( ' ', $menu_item->classes ), ENT_QUOTES ) . '" />'; 124 $output .= '<input type="hidden" class="menu-item-xfn" name="menu-item[' . $possible_object_id . '][menu-item-xfn]" value="' . htmlspecialchars( $menu_item->xfn, ENT_QUOTES ) . '" />'; 125 125 } 126 126 } -
branches/6.6/src/wp-admin/includes/class-walker-nav-menu-edit.php
r56586 r61903 204 204 <label for="edit-menu-item-title-<?php echo $item_id; ?>"> 205 205 <?php _e( 'Navigation Label' ); ?><br /> 206 <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( $menu_item->title); ?>" />206 <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( $menu_item->title, ENT_QUOTES ); ?>" /> 207 207 </label> 208 208 </p> … … 210 210 <label for="edit-menu-item-attr-title-<?php echo $item_id; ?>"> 211 211 <?php _e( 'Title Attribute' ); ?><br /> 212 <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( $menu_item->post_excerpt); ?>" />212 <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( $menu_item->post_excerpt, ENT_QUOTES ); ?>" /> 213 213 </label> 214 214 </p> … … 222 222 <label for="edit-menu-item-classes-<?php echo $item_id; ?>"> 223 223 <?php _e( 'CSS Classes (optional)' ); ?><br /> 224 <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( ' ', $menu_item->classes )); ?>" />224 <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( ' ', $menu_item->classes ), ENT_QUOTES ); ?>" /> 225 225 </label> 226 226 </p> … … 228 228 <label for="edit-menu-item-xfn-<?php echo $item_id; ?>"> 229 229 <?php _e( 'Link Relationship (XFN)' ); ?><br /> 230 <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( $menu_item->xfn); ?>" />230 <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( $menu_item->xfn, ENT_QUOTES ); ?>" /> 231 231 </label> 232 232 </p> -
branches/6.6/src/wp-admin/includes/file.php
r58409 r61903 1908 1908 } 1909 1909 1910 // Don't extract invalid files: 1911 if ( 0 !== validate_file( $file['filename'] ) ) { 1912 continue; 1913 } 1914 1910 1915 $uncompressed_size += $file['size']; 1911 1916 -
branches/6.6/src/wp-includes/ID3/getid3.lib.php
r56975 r61903 14 14 if(!defined('GETID3_LIBXML_OPTIONS') && defined('LIBXML_VERSION')) { 15 15 if(LIBXML_VERSION >= 20621) { 16 define('GETID3_LIBXML_OPTIONS', LIBXML_NO ENT | LIBXML_NONET | LIBXML_NOWARNING | LIBXML_COMPACT);16 define('GETID3_LIBXML_OPTIONS', LIBXML_NONET | LIBXML_NOWARNING | LIBXML_COMPACT); 17 17 } else { 18 define('GETID3_LIBXML_OPTIONS', LIBXML_NO ENT | LIBXML_NONET | LIBXML_NOWARNING);18 define('GETID3_LIBXML_OPTIONS', LIBXML_NONET | LIBXML_NOWARNING); 19 19 } 20 20 } -
branches/6.6/src/wp-includes/class-wp-block-patterns-registry.php
r58186 r61903 199 199 $patterns = &$this->registered_patterns; 200 200 } 201 if ( ! isset( $patterns[ $pattern_name ]['content'] ) && isset( $patterns[ $pattern_name ]['filePath'] ) ) { 201 202 $pattern_path = realpath( $patterns[ $pattern_name ]['filePath'] ?? '' ); 203 if ( 204 ! isset( $patterns[ $pattern_name ]['content'] ) && 205 is_string( $pattern_path ) && 206 ( str_ends_with( $pattern_path, '.php' ) || str_ends_with( $pattern_path, '.html' ) ) && 207 is_file( $pattern_path ) && 208 is_readable( $pattern_path ) 209 ) { 202 210 ob_start(); 203 211 include $patterns[ $pattern_name ]['filePath']; … … 205 213 unset( $patterns[ $pattern_name ]['filePath'] ); 206 214 } 215 207 216 return $patterns[ $pattern_name ]['content']; 208 217 } -
branches/6.6/src/wp-includes/class-wp-http-ixr-client.php
r54133 r61903 90 90 } 91 91 92 $response = wp_ remote_post( $url, $args );92 $response = wp_safe_remote_post( $url, $args ); 93 93 94 94 if ( is_wp_error( $response ) ) { -
branches/6.6/src/wp-includes/html-api/class-wp-html-tag-processor.php
r58980 r61903 3563 3563 */ 3564 3564 const COMMENT_AS_INVALID_HTML = 'COMMENT_AS_INVALID_HTML'; 3565 3566 /** 3567 * Wakeup magic method. 3568 * 3569 * @since 6.9.2 3570 */ 3571 public function __wakeup() { 3572 throw new \LogicException( __CLASS__ . ' should never be unserialized' ); 3573 } 3565 3574 } -
branches/6.6/src/wp-includes/interactivity-api/class-wp-interactivity-api.php
r58869 r61903 790 790 } 791 791 792 // Skip if the bound attribute is an event handler. 793 if ( str_starts_with( $bound_attribute, 'on' ) ) { 794 _doing_it_wrong( 795 __METHOD__, 796 sprintf( 797 /* translators: %s: The directive, e.g. data-wp-on--click. */ 798 __( 'Binding event handler attributes is not supported. Please use "%s" instead.' ), 799 esc_attr( 'data-wp-on--' . substr( $bound_attribute, 2 ) ) 800 ), 801 'x.y.z' 802 ); 803 continue; 804 } 805 792 806 $attribute_value = $p->get_attribute( $attribute_name ); 793 807 $result = $this->evaluate( $attribute_value ); -
branches/6.6/src/wp-includes/kses.php
r58424 r61903 1963 1963 $content = preg_replace_callback( '/&([A-Za-z]{2,8}[0-9]{0,2});/', 'wp_kses_named_entities', $content ); 1964 1964 } 1965 $content = preg_replace_callback( '/&#(0*[ 0-9]{1,7});/', 'wp_kses_normalize_entities2', $content );1966 $content = preg_replace_callback( '/&#[Xx](0*[ 0-9A-Fa-f]{1,6});/', 'wp_kses_normalize_entities3', $content );1965 $content = preg_replace_callback( '/&#(0*[1-9][0-9]{0,6});/', 'wp_kses_normalize_entities2', $content ); 1966 $content = preg_replace_callback( '/&#[Xx](0*[1-9A-Fa-f][0-9A-Fa-f]{0,5});/', 'wp_kses_normalize_entities3', $content ); 1967 1967 1968 1968 return $content; -
branches/6.6/src/wp-includes/media.php
r58862 r61903 4381 4381 if ( $attachment->post_parent ) { 4382 4382 $post_parent = get_post( $attachment->post_parent ); 4383 if ( $post_parent ) {4383 if ( $post_parent && current_user_can( 'read_post', $attachment->post_parent ) ) { 4384 4384 $response['uploadedToTitle'] = $post_parent->post_title ? $post_parent->post_title : __( '(no title)' ); 4385 4385 $response['uploadedToLink'] = get_edit_post_link( $attachment->post_parent, 'raw' ); -
branches/6.6/src/wp-includes/nav-menu.php
r58119 r61903 507 507 } 508 508 509 if ( wp_unslash( $args['menu-item-title'] ) === wp_specialchars_decode( $original_title )) {509 if ( wp_unslash( $args['menu-item-title'] ) === $original_title ) { 510 510 $args['menu-item-title'] = ''; 511 511 } -
branches/6.6/src/wp-includes/template-loader.php
r47855 r61903 103 103 */ 104 104 $template = apply_filters( 'template_include', $template ); 105 if ( $template ) { 105 $template = is_string( $template ) ? realpath( $template ) : null; 106 if ( 107 is_string( $template ) && 108 ( str_ends_with( $template, '.php' ) || str_ends_with( $template, '.html' ) ) && 109 is_file( $template ) && 110 is_readable( $template ) 111 ) { 106 112 include $template; 107 113 } elseif ( current_user_can( 'switch_themes' ) ) { -
branches/6.6/tests/phpunit/tests/post/nav-menu.php
r57987 r61903 1189 1189 ); 1190 1190 1191 $this->assertSame( 'Test Cat - "Pre-Slashed" Cat Name & >', $category->name ); 1192 1191 1193 $category_item_id = wp_update_nav_menu_item( 1192 1194 $this->menu_id, … … 1197 1199 'menu-item-object-id' => $category->term_id, 1198 1200 'menu-item-status' => 'publish', 1199 /* 1200 * Interestingly enough, if we use `$cat->name` for the menu item title, 1201 * we won't be able to replicate the bug because it's in htmlentities form. 1202 */ 1203 'menu-item-title' => $category_name, 1201 'menu-item-title' => $category->name, 1204 1202 ) 1205 1203 );
Note: See TracChangeset
for help on using the changeset viewer.