diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 00830c68f5..b442b0b151 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -3094,6 +3094,10 @@ function wp_targeted_link_rel_callback( $matches ) { $delimiter = trim( $rel_match[1] ) ? $rel_match[1] : '"'; $rel = 'rel=' . $delimiter . trim( implode( ' ', $parts ) ) . $delimiter; $link_html = str_replace( $rel_match[0], $rel, $link_html ); + } elseif ( preg_match( '|target\s*=\s*?\\\\"|', $link_html ) ) { + $link_html .= " rel=\\\"$rel\\\""; + } elseif ( preg_match( '#(target|href)\s*=\s*?\'#', $link_html ) ) { + $link_html .= " rel='$rel'"; } else { $link_html .= " rel=\"$rel\""; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 295e6df7e3..ce10a990d0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.2.1-alpha-45347'; +$wp_version = '5.2.1-alpha-45349'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.