[wp-trac] [WordPress Trac] #10312: Author names not encoded from api.wordpress.org

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 30 18:52:57 GMT 2009


#10312: Author names not encoded from api.wordpress.org
--------------------------+-------------------------------------------------
 Reporter:  picklingjar   |       Owner:                  
     Type:  defect (bug)  |      Status:  new             
 Priority:  normal        |   Milestone:  Unassigned      
Component:  Plugins       |     Version:                  
 Severity:  normal        |    Keywords:  api, rpc, plugin
--------------------------+-------------------------------------------------
 '''Problem'''
 Author names with non ascii characters can look corrupt in the plugin
 browser due to them not being encoded, the problem also effects addons
 using the plugin api together with rpc.

 '''Example'''
 Search for the c s lewis quotes plugin or any plugin where the author has
 a non ascii character.

 '''Fix'''
 The data returned from http://api.wordpress.org/plugins/info/1.0/ should
 encode the author name (but not the included link) before sending it.

 '''Temporary Fix for plugin lising (doesn't fix plugins & rpc)'''
 Use the following code to apply htmlentities to the authors name but
 preserve the a href tag sent from api.wordpress.org

 replace

 {{{
 $author = $plugin['author'];
 }}}


 with

 {{{
 $author = preg_replace("/>(.*)</Ue",
 "'>'.htmlentities('\\1').'<'",$plugin['author'])
 }}}

 in wp-admin/includes/plugin-install.php

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10312>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list