[wp-trac] [WordPress Trac] #37057: Creation of an esc_html functions for _n(), _nx(), _ex(), and number_format_i18n()

WordPress Trac noreply at wordpress.org
Mon Sep 6 10:44:57 UTC 2021


#37057: Creation of an esc_html functions for _n(), _nx(), _ex(), and
number_format_i18n()
-------------------------+------------------------------
 Reporter:  zakkath      |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  I18N         |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:
-------------------------+------------------------------
Changes (by bedas):

 * type:  feature request => enhancement


Comment:

 Usage case of `_nx()` printed:
 {{{#!php
 <?php
 printf(
   /* translators: 1: number of comments, 2: post title */
   _nx(
     '%1$s comment on %2$s',
     '%1$s comments on %2$s',
     $comments_number,
     'comments title',
     'twentysixteen'
   ),
   number_format_i18n( $comments_number ),
   get_the_title()
 );
 }}}


 By my knowledge there is not escape wrapper for this and WPCS flags it.
 It would be nice to have the wrapper just for consistency if anything.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/37057#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list