From e6a1bade1c88bde71cba9b4a0c5d934d4f727f71 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 21 Feb 2008 23:49:05 +0000 Subject: [PATCH] Make pagename regex ungreedy. Fixes /pagename/2 links git-svn-id: http://svn.automattic.com/wordpress/trunk@6964 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/rewrite.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index 64e82167c6..7a80dad50e 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -218,7 +218,7 @@ class WP_Rewrite { '(.+?)', '(.+?)', '([^/]+)', - '([^/]+)', + '([^/]+?)', '(.+)' ); @@ -317,7 +317,7 @@ class WP_Rewrite { $page_structure = $this->get_page_permastruct(); if ( ! $this->use_verbose_page_rules ) { - $this->add_rewrite_tag('%pagename%', "(.+)", 'pagename='); + $this->add_rewrite_tag('%pagename%', "(.+?)", 'pagename='); $rewrite_rules = array_merge($rewrite_rules, $this->generate_rewrite_rules($page_structure, EP_PAGES)); return $rewrite_rules; }