[wp-trac] [WordPress Trac] #37457: Review usage of esc_attr_e()

WordPress Trac noreply at wordpress.org
Mon Jul 25 12:33:48 UTC 2016


#37457: Review usage of esc_attr_e()
----------------------------+----------------------------------------
 Reporter:  afercia         |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Future Release
Component:  Administration  |    Version:
 Severity:  normal          |   Keywords:  needs-patch good-first-bug
  Focuses:                  |
----------------------------+----------------------------------------
 Spotted a few places where `esc_attr_e()` is probably used not correctly,
 maybe worth double checking if there are more places:

 Here it should probably be `echo esc_url()` and the URL should be
 translatable as done in other similar cases:

 {{{
 setup-config.php
 <p id="logo"><a href="<?php esc_attr_e( 'https://wordpress.org/' ); ?>"
 ...

 }}}


 In the following cases the string are used for plain HTML text, they're
 not attributes:

 {{{
 revision.php
 ...
         <?php esc_attr_e( 'Compare any two revisions' ); ?>
 </label>


 comment.php
 ... <?php esc_attr_e( 'Edit' ); ?></a>
 ... <?php esc_attr_e( 'Cancel' ); ?></a>
 }}}

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


More information about the wp-trac mailing list