[wp-trac] Re: [WordPress Trac] #8098: trailing p's removed from
query by canonical redirect
WordPress Trac
wp-trac at lists.automattic.com
Sat Nov 8 01:12:15 GMT 2008
#8098: trailing p's removed from query by canonical redirect
---------------------+------------------------------------------------------
Reporter: DD32 | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.7
Component: General | Version: 2.7
Severity: normal | Resolution:
Keywords: |
---------------------+------------------------------------------------------
Changes (by DD32):
* keywords: has-patch =>
Comment:
The problem is caused by
http://trac.wordpress.org/browser/trunk/wp-includes/canonical.php#L207
{{{
$redirect['query'] = preg_replace( '#&?(p|page_id|cat|tag)=?$#', '',
$redirect['query'] );
}}}
I was thinking the first ? was unescaped, but on closer inspection, It
appears my logic was wrong, The start of the expression needs to be tied
to either the start of the string, or a &, And i'm not quite sure how to
achieve that
--
Ticket URL: <http://trac.wordpress.org/ticket/8098#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list