Make WordPress Core

Changeset 47430


Ignore:
Timestamp:
03/04/2020 12:03:32 PM (5 years ago)
Author:
SergeyBiryukov
Message:

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

Props subrataemfluence.
Fixes #45643.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r47429 r47430  
    65496549function get_tag_regex( $tag ) {
    65506550    if ( empty( $tag ) ) {
    6551         return;
     6551        return '';
    65526552    }
    65536553    return sprintf( '<%1$s[^<]*(?:>[\s\S]*<\/%1$s>|\s*\/>)', tag_escape( $tag ) );
Note: See TracChangeset for help on using the changeset viewer.