Make pagename regex ungreedy. Fixes /pagename/2 links
git-svn-id: http://svn.automattic.com/wordpress/trunk@6964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8b6ba5061c
commit
e6a1bade1c
|
@ -218,7 +218,7 @@ class WP_Rewrite {
|
||||||
'(.+?)',
|
'(.+?)',
|
||||||
'(.+?)',
|
'(.+?)',
|
||||||
'([^/]+)',
|
'([^/]+)',
|
||||||
'([^/]+)',
|
'([^/]+?)',
|
||||||
'(.+)'
|
'(.+)'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ class WP_Rewrite {
|
||||||
$page_structure = $this->get_page_permastruct();
|
$page_structure = $this->get_page_permastruct();
|
||||||
|
|
||||||
if ( ! $this->use_verbose_page_rules ) {
|
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));
|
$rewrite_rules = array_merge($rewrite_rules, $this->generate_rewrite_rules($page_structure, EP_PAGES));
|
||||||
return $rewrite_rules;
|
return $rewrite_rules;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue