More reliably replace $home_root in $request in get_pagenum_link(). props SergeyBiryukov. fixes #18034

git-svn-id: https://develop.svn.wordpress.org/trunk@21174 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2012-06-28 20:54:20 +00:00
parent abc6fd3848
commit 016b10f1f1
1 changed files with 1 additions and 1 deletions

View File

@ -1387,7 +1387,7 @@ function get_pagenum_link($pagenum = 1, $escape = true ) {
$home_root = parse_url(home_url());
$home_root = ( isset($home_root['path']) ) ? $home_root['path'] : '';
$home_root = preg_quote( trailingslashit( $home_root ), '|' );
$home_root = preg_quote( $home_root, '|' );
$request = preg_replace('|^'. $home_root . '|', '', $request);
$request = preg_replace('|^/+|', '', $request);