diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index d1a4ca0da..2be9eed79 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -464,11 +464,14 @@ function wp_list_categories( $args = '' ) { $output .= $show_option_none; } } else { - if( !empty( $show_option_all ) ) + if ( ! empty( $show_option_all ) ) { + $posts_page = ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) ) ? get_permalink( get_option( 'page_for_posts' ) ) : home_url( '/' ); + $posts_page = esc_url( $posts_page ); if ( 'list' == $style ) - $output .= '