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

Merges [44833] to the 4.4 branch.
Built from https://develop.svn.wordpress.org/branches/4.4@44841


git-svn-id: http://core.svn.wordpress.org/branches/4.4@44673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-03-12 22:27:20 +00:00
parent d79c34ca3a
commit ab80be3ffa

View File

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