Always escape the output of get_pagenum_link(). fixes #14556 for the 3.3 branch.

git-svn-id: http://core.svn.wordpress.org/branches/3.3@21084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2012-06-15 17:02:39 +00:00
parent c7d8109fc6
commit 1f0cd2b054

View File

@ -1375,9 +1375,11 @@ function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_cate
* @since 1.5.0
*
* @param int $pagenum Optional. Page ID.
* @param bool $escape Optional. Whether to escape the URL for display, with esc_url(). Defaults to true.
* Otherwise, prepares the URL with esc_url_raw().
* @return string
*/
function get_pagenum_link($pagenum = 1) {
function get_pagenum_link($pagenum = 1, $escape = true ) {
global $wp_rewrite;
$pagenum = (int) $pagenum;
@ -1428,7 +1430,10 @@ function get_pagenum_link($pagenum = 1) {
$result = apply_filters('get_pagenum_link', $result);
return $result;
if ( $escape )
return esc_url( $result );
else
return esc_url_raw( $result );
}
/**