[wp-trac] [WordPress Trac] #9591: remove_accents() improvements for i18n permalinks

WordPress Trac wp-trac at lists.automattic.com
Fri May 6 14:35:08 UTC 2011


#9591: remove_accents() improvements for i18n permalinks
-----------------------------------+-----------------------------
 Reporter:  Denis-de-Bernardy      |       Owner:  ryan
     Type:  defect (bug)           |      Status:  reopened
 Priority:  high                   |   Milestone:  Future Release
Component:  Permalinks             |     Version:  3.1
 Severity:  minor                  |  Resolution:
 Keywords:  3.2-early needs-patch  |
-----------------------------------+-----------------------------
Changes (by Pierre_02):

 * cc: Pierre_02 (added)
 * keywords:  3.2-early => 3.2-early needs-patch
 * version:  3.0.1 => 3.1
 * type:  enhancement => defect (bug)


Comment:

 Hi all,

 i notice a bug with custom post type with emphasis (i use them, i'm
 french) and pagination.
 i'm currently developing a website where i use my own custom post type for
 accomodation/restaurant.
 So a user can select a type of accomodation/restaurant (eg : Hôtel,
 Restaurant, Camping, etc.) by clicking on a tag then it can refine its
 choice by click on a tag of the town name (eg : Villers-Cotterêts).
 The problem is that, if the name of the town contains an emphasis when i
 click on "Next page" i got a 301 redirect and my emphasis caracters are
 removed during the redirection :(... So the name of town (Villers-
 Cotterêts) becomes "Villers-Cotterts" and no record is found...

 I know about URL sanitization of WP and it's why i used a querystring.
 Hopping that WP let it untouched.
 Of course, i've tried to hard code the name of the town in my 'meta_value'
 and then, everything works fine. Despite the redirection, WP show me the
 next pages for the selected criteria ; so this is not a programming
 problem.

 In my code, i use a syntax with querystring to generate my url.
 example : http://mywebsite.fr/commerce/type/restaurant/?ville=Villers-
 Cotter%C3%AAts so the next page link (generated by the 'next_posts_link'
 function) will be
 http://mywebsite.fr/commerce/type/restaurant/page/2/?ville=Villers-
 Cotter%C3%AAts but if i click on it the WP redirect me (by a 301 error) to
 http://mywebsite.fr/commerce/type/hotel/page/2/?ville=Villers-Cotterts
 (notice the removing of ê). WP removes space in names too...

 So my question is : Why, when it's the first page, WP let untouched my
 querystring and as soon as i paginate i'm victim of 301 redirect ?

 TIA.

 Amicably,

 Pierre.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9591#comment:63>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list