Make WordPress Core

Changeset 10506


Ignore:
Timestamp:
02/04/2009 11:07:57 PM (16 years ago)
Author:
markjaquith
Message:

Strip /feed/ endings even if they are not at the very end, in canonical. props jhodgdon. fixes #8642 for 2.7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.7/wp-includes/canonical.php

    r10397 r10506  
    137137                // Strip off paging and feed
    138138                $paged_redirect['path'] = preg_replace('#/page/[0-9]+?(/+)?$#', '/', $paged_redirect['path']); // strip off any existing paging
    139                 $paged_redirect['path'] = preg_replace('#/(comments/?)?(feed|rss2?|rdf|atom)(/+)?$#', '/', $paged_redirect['path']); // strip off feed endings
     139                $paged_redirect['path'] = preg_replace('#/(comments/?)?(feed|rss2?|rdf|atom)(/+|$)#', '/', $paged_redirect['path']); // strip off feed endings
    140140                $paged_redirect['path'] = preg_replace('#/comment-page-[0-9]+?(/+)?$#', '/', $paged_redirect['path']); // strip off any existing comment paging
    141141            }
Note: See TracChangeset for help on using the changeset viewer.