General: Ensure `get_tag_regex()` always returns a string, to match the documented value.

Props subrataemfluence.
Fixes #45643.

git-svn-id: https://develop.svn.wordpress.org/trunk@47430 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-03-04 12:03:32 +00:00
parent 7a4f9cc9a6
commit 48df8c3646
1 changed files with 1 additions and 1 deletions

View File

@ -6548,7 +6548,7 @@ function wp_auth_check( $response ) {
*/
function get_tag_regex( $tag ) {
if ( empty( $tag ) ) {
return;
return '';
}
return sprintf( '<%1$s[^<]*(?:>[\s\S]*<\/%1$s>|\s*\/>)', tag_escape( $tag ) );
}