Changeset 61948
- Timestamp:
- 03/12/2026 01:43:40 AM (4 months ago)
- Location:
- branches/6.3
- 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/html-api/class-wp-html-tag-processor.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.3
- Property svn:mergeinfo changed
/trunk merged: 61879-61885,61887,61889-61890,61913
- Property svn:mergeinfo changed
-
branches/6.3/src/js/_enqueues/wp/util.js
r54241 r61948 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.3/src/wp-admin/includes/class-walker-nav-menu-checklist.php
r51779 r61948 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.3/src/wp-admin/includes/class-walker-nav-menu-edit.php
r55276 r61948 203 203 <label for="edit-menu-item-title-<?php echo $item_id; ?>"> 204 204 <?php _e( 'Navigation Label' ); ?><br /> 205 <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); ?>" />205 <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 ); ?>" /> 206 206 </label> 207 207 </p> … … 209 209 <label for="edit-menu-item-attr-title-<?php echo $item_id; ?>"> 210 210 <?php _e( 'Title Attribute' ); ?><br /> 211 <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); ?>" />211 <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 ); ?>" /> 212 212 </label> 213 213 </p> … … 221 221 <label for="edit-menu-item-classes-<?php echo $item_id; ?>"> 222 222 <?php _e( 'CSS Classes (optional)' ); ?><br /> 223 <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 )); ?>" />223 <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 ); ?>" /> 224 224 </label> 225 225 </p> … … 227 227 <label for="edit-menu-item-xfn-<?php echo $item_id; ?>"> 228 228 <?php _e( 'Link Relationship (XFN)' ); ?><br /> 229 <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); ?>" />229 <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 ); ?>" /> 230 230 </label> 231 231 </p> -
branches/6.3/src/wp-admin/includes/file.php
r56186 r61948 1834 1834 } 1835 1835 1836 // Don't extract invalid files: 1837 if ( 0 !== validate_file( $file['filename'] ) ) { 1838 continue; 1839 } 1840 1836 1841 $uncompressed_size += $file['size']; 1837 1842 -
branches/6.3/src/wp-includes/ID3/getid3.lib.php
r54376 r61948 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.3/src/wp-includes/class-wp-http-ixr-client.php
r54133 r61948 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.3/src/wp-includes/html-api/class-wp-html-tag-processor.php
r58476 r61948 2418 2418 return true; 2419 2419 } 2420 2421 /** 2422 * Wakeup magic method. 2423 * 2424 * @since 6.9.2 2425 */ 2426 public function __wakeup() { 2427 throw new \LogicException( __CLASS__ . ' should never be unserialized' ); 2428 } 2420 2429 } -
branches/6.3/src/wp-includes/kses.php
r56191 r61948 1893 1893 $content = preg_replace_callback( '/&([A-Za-z]{2,8}[0-9]{0,2});/', 'wp_kses_named_entities', $content ); 1894 1894 } 1895 $content = preg_replace_callback( '/&#(0*[ 0-9]{1,7});/', 'wp_kses_normalize_entities2', $content );1896 $content = preg_replace_callback( '/&#[Xx](0*[ 0-9A-Fa-f]{1,6});/', 'wp_kses_normalize_entities3', $content );1895 $content = preg_replace_callback( '/&#(0*[1-9][0-9]{0,6});/', 'wp_kses_normalize_entities2', $content ); 1896 $content = preg_replace_callback( '/&#[Xx](0*[1-9A-Fa-f][0-9A-Fa-f]{0,5});/', 'wp_kses_normalize_entities3', $content ); 1897 1897 1898 1898 return $content; -
branches/6.3/src/wp-includes/media.php
r56846 r61948 4352 4352 if ( $attachment->post_parent ) { 4353 4353 $post_parent = get_post( $attachment->post_parent ); 4354 if ( $post_parent ) {4354 if ( $post_parent && current_user_can( 'read_post', $attachment->post_parent ) ) { 4355 4355 $response['uploadedToTitle'] = $post_parent->post_title ? $post_parent->post_title : __( '(no title)' ); 4356 4356 $response['uploadedToLink'] = get_edit_post_link( $attachment->post_parent, 'raw' ); -
branches/6.3/src/wp-includes/nav-menu.php
r56192 r61948 497 497 } 498 498 499 if ( wp_unslash( $args['menu-item-title'] ) === wp_specialchars_decode( $original_title )) {499 if ( wp_unslash( $args['menu-item-title'] ) === $original_title ) { 500 500 $args['menu-item-title'] = ''; 501 501 } -
branches/6.3/src/wp-includes/template-loader.php
r47855 r61948 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/6.3/tests/phpunit/tests/post/nav-menu.php
r55979 r61948 1192 1192 ); 1193 1193 1194 $this->assertSame( 'Test Cat - "Pre-Slashed" Cat Name & >', $category->name ); 1195 1194 1196 $category_item_id = wp_update_nav_menu_item( 1195 1197 $this->menu_id, … … 1200 1202 'menu-item-object-id' => $category->term_id, 1201 1203 'menu-item-status' => 'publish', 1202 /* 1203 * Interestingly enough, if we use `$cat->name` for the menu item title, 1204 * we won't be able to replicate the bug because it's in htmlentities form. 1205 */ 1206 'menu-item-title' => $category_name, 1204 'menu-item-title' => $category->name, 1207 1205 ) 1208 1206 );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)