[wp-trac] [WordPress Trac] #20999: WordPress 3.4 doesn't handle rss url with percent code correctly

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 26 05:54:29 UTC 2012


#20999: WordPress 3.4 doesn't handle rss url with percent code correctly
--------------------------------+-----------------------
 Reporter:  herophuong          |       Owner:  rmccue
     Type:  defect (bug)        |      Status:  assigned
 Priority:  normal              |   Milestone:  3.4.1
Component:  External Libraries  |     Version:  3.4
 Severity:  normal              |  Resolution:
 Keywords:  dev-feedback        |
--------------------------------+-----------------------

Comment (by rmccue):

 Replying to [comment:3 kurtpayne]:
 > Thanks for the extra information.  I can reproduce this with the code
 below:
 >
 > {{{
 > $url =
 'https://news.google.com/news/feeds?gl=vn&pz=1&cf=all&ned=vi_vn&hl=vi&q=ch%E1%BB%91ng+h%C3%A0ng+gi%E1%BA%A3&output=rss';
 > var_dump($url);
 >
 > // outputs:
 > // string
 'https://news.google.com/news/feeds?gl=vn&pz=1&cf=all&ned=vi_vn&hl=vi&q=ch%E1%BB%91ng+h%C3%A0ng+gi%E1%BA%A3&output=rss'
 (length=117)
 >
 > $iri =& new SimplePie_IRI($url);
 > var_dump($iri->get_iri());
 >
 > // outputs:
 > // string
 'https://news.google.com/news/feeds?gl=vn&pz=1&cf=all&ned=vi_vn&hl=vi&q=chống+hàng+giả&output=rss'
 (length=101)
 > }}}

 Note that this is not the same as the original issue, although it's likely
 that it's linked. `SimplePie_IRI` decodes some percent-encoded strings to
 try and form a canonical IRI. It appears in this case that it is doing so
 incorrectly. The original issue though has the characters replaced by
 U+FFFD.

 My guess is that the same code is affecting both instances, but that the
 original issue is also occurring because of iconv/mbstring errors.

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


More information about the wp-trac mailing list