mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 15:17:42 +02:00
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:
parent
d79c34ca3a
commit
ab80be3ffa
@ -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 ) . "\">";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user