WordPress.org

Make WordPress Core

Ticket #26674: get-tag-regex.diff

File get-tag-regex.diff, 456 bytes (added by kopepasah, 6 years ago)
  • wp-includes/functions.php

     
    41164116function get_tag_regex( $tag ) {
    41174117        if ( empty( $tag ) )
    41184118                return;
    4119         return sprintf( '<%1$s[^<]*(?:>[\s\S]*<\/%1$s>|\s*\/>)', tag_escape( $tag ) );
     4119        return sprintf( '<%1$s[^<]*?(?:>[\s\S]*?<\/%1$s>|\s*\/>)', tag_escape( $tag ) );
    41204120}
    41214121
    41224122/**