Index: wp-includes/general-template.php
===================================================================
--- wp-includes/general-template.php	(revision 56215)
+++ wp-includes/general-template.php	(working copy)
@@ -906,17 +906,8 @@
 			break;
 	}
 
-	$url = true;
-
-	if ( ! str_contains( $show, 'url' )
-		&& ! str_contains( $show, 'directory' )
-		&& ! str_contains( $show, 'home' )
-	) {
-		$url = false;
-	}
-
 	if ( 'display' === $filter ) {
-		if ( $url ) {
+		if ( preg_match( '/url|directory|home/', $show ) ) {
 			/**
 			 * Filters the URL returned by get_bloginfo().
 			 *
