[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
Thu Jun 9 00:32:52 UTC 2016


#37057: Creation of an esc_html functions for _n(), _nx(), _ex(), and
number_format_i18n()
-----------------------------+-----------------------------
 Reporter:  zakkath          |      Owner:
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  General          |    Version:  4.5.2
 Severity:  normal           |   Keywords:
  Focuses:  template         |
-----------------------------+-----------------------------
 Using a lot of the translation functions generates an error using the
 WordPress Coding Standards under PHPCS such as:

  Expected next thing to be an escaping function (see Codex for 'Data
 Validation'), not '_nx'

 Certain functions like _x(), _e(), __() all have equivalent esc_html
 functions. But there are no esc_html equivalent for these other functions.

 Granted one could simply wrap the statements in esc_html(), for the sake
 of consistency and standardization for theme developers, I feel that
 esc_html versions of these functions should be created.

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


More information about the wp-trac mailing list