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

git-svn-id: http://core.svn.wordpress.org/trunk@21174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2012-06-28 20:54:20 +00:00
parent 55278fa7a4
commit de336fea5c

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);