- Timestamp:
- 12/31/2015 03:12:36 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets.php
r35992 r36130 617 617 $index = "sidebar-$index"; 618 618 } else { 619 $ sanitized_index = sanitize_title( $index );619 $index = sanitize_title( $index ); 620 620 foreach ( (array) $wp_registered_sidebars as $key => $value ) { 621 if ( sanitize_title( $value['name'] ) == $ sanitized_index ) {621 if ( sanitize_title( $value['name'] ) == $index ) { 622 622 $index = $key; 623 623 break; -
trunk/tests/phpunit/tests/widgets.php
r35272 r36130 534 534 $option_value = get_option( $wp_widget_search->option_name ); 535 535 $this->assertArrayNotHasKey( 2, $option_value ); 536 }537 538 /**539 * @ticket 23423540 */541 function test_dynamic_sidebar_id_special_characters() {542 wp_widgets_init();543 register_sidebar( array(544 'name' => 'Sidebar 2',545 'id' => 'sidebar-2',546 ) );547 548 ob_start();549 $result = dynamic_sidebar( 'Sidebar 1' );550 ob_end_clean();551 552 $this->assertFalse( $result );553 536 } 554 537
Note: See TracChangeset
for help on using the changeset viewer.