[wp-trac] [WordPress Trac] #25113: non-latin CPT rewrite slugs fail `wp_safe_redirect`

WordPress Trac noreply at wordpress.org
Wed Aug 28 15:51:39 UTC 2013


#25113: non-latin CPT rewrite slugs fail `wp_safe_redirect`
--------------------------+------------------------------
 Reporter:  entr          |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Post Types    |     Version:  3.6
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |
--------------------------+------------------------------

Comment (by nofearinc):

 I've tested a modified version [http://www.php.net/manual/bg/function.idn-
 to-utf8.php#112097 of this snippet] which works fine for resolving (and
 not breaking a list of test domains):

 {{{
         $url1 = 'http://blogdomain.com/продукт/post_name';
         $url2 = 'xn--sorra-lqa.it';
         $url3 = 'xn--maana-pta.com';
         $url4 = 'xn--bcher-kva.com';
         $url5 = 'xn--caf-dma.com';
         $url6 = 'yahoo.com';
         $url7 = 'google.com';
         $url8 = 'dir.bg';
 }}}

 However, @nacin said that it's not compatible with the WordPress license,
 and the original PHP function is supported by PHP 5.3+ only.

 I saw that Ryan
 [https://github.com/rmccue/Requests/blob/master/library/Requests/IDNAEncoder.php
 was working on some IDNA encoder] and there are probably other license-
 compatible solutions, but I'm not sure how much of an overhead would it be
 to add a 200-400 LoC class for this use case. Thoughts?

 Still there are few more related tickets to that problem, but can't decide
 how urgent or widespread that is.

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


More information about the wp-trac mailing list