[wp-trac] [WordPress Trac] #6188: attribute_escape breaks HTML in translated strings

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 12 13:30:49 GMT 2008


#6188: attribute_escape breaks HTML in translated strings
----------------------+-----------------------------------------------------
 Reporter:  thenlich  |       Owner:  anonymous
     Type:  defect    |      Status:  new      
 Priority:  normal    |   Milestone:  2.6      
Component:  i18n      |     Version:           
 Severity:  normal    |    Keywords:           
----------------------+-----------------------------------------------------
 In many places, there are calls like '''attribute_escape(__('...'))'''

 For example, in wp-includes/script-loader.php:143

 {{{
 $this->localize( 'post', 'postL10n', array(
         'tagsUsed' =>  __('Tags used on this post:'),
         'add' => attribute_escape(__('Add')),
         'addTag' => attribute_escape(__('Add new tag')),
         'separate' => __('Separate tags with commas'),
         ) );

 }}}

 This breaks translation, if the translated string contains HTML special
 characters,
 e.g. "Hinzufügen".

 Another function should be used, which only converts quotes/double quotes.
 HTML code in attributes is perfectly acceptable per standard and should
 not be prohibited.

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


More information about the wp-trac mailing list