Make WordPress Core

Ticket #51313: formatting.diff

File formatting.diff, 522 bytes (added by antonlukin, 4 years ago)

Patch to links_add_target function

  • wp-includes/formatting.php

     
    52435243        global $_links_add_target;
    52445244        $_links_add_target = $target;
    52455245        $tags              = implode( '|', (array) $tags );
    5246         return preg_replace_callback( "!<($tags)([^>]*)>!i", '_links_add_target', $content );
     5246        return preg_replace_callback( "!<($tags)(\s[^>]*)?>!i", '_links_add_target', $content );
    52475247}
    52485248
    52495249/**