Formatting: Improve rel="nofollow" handling in comments.

Merges [44833] to the 4.4 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/4.4@44841 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-03-12 22:26:13 +00:00
parent b9e2bd5a8b
commit b7387dfa26

View File

@ -2356,11 +2356,11 @@ function wp_rel_nofollow_callback( $matches ) {
$html = '';
foreach ( $atts as $name => $value ) {
$html .= "{$name}=\"$value\" ";
$html .= "{$name}=\"" . esc_attr( $value ) . "\" ";
}
$text = trim( $html );
}
return "<a $text rel=\"$rel\">";
return "<a $text rel=\"" . esc_attr( $rel ) . "\">";
}
/**