Automatically esc_url() the URL echoed by the_permalink().
This makes the_permalink() useful, rather than needing to do `echo esc_url( get_permalink() )` to get proper encoding of ampersands, etc. This will not double-encode when esc_url() has already been applied to the filter here, but that code can now be removed. props mfields. fixes #17562. git-svn-id: http://core.svn.wordpress.org/trunk@23527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c362979823
commit
48f23ba3a5
|
@ -13,7 +13,7 @@
|
||||||
* @uses apply_filters() Calls 'the_permalink' filter on the permalink string.
|
* @uses apply_filters() Calls 'the_permalink' filter on the permalink string.
|
||||||
*/
|
*/
|
||||||
function the_permalink() {
|
function the_permalink() {
|
||||||
echo apply_filters('the_permalink', get_permalink());
|
echo esc_url( apply_filters( 'the_permalink', get_permalink() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue