[wp-trac] [WordPress Trac] #54775: Allow int/float for esc_ functions

WordPress Trac noreply at wordpress.org
Tue Mar 1 14:09:59 UTC 2022


#54775: Allow int/float for esc_ functions
-------------------------+-------------------------------
 Reporter:  malthert     |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Security     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  close        |     Focuses:  coding-standards
-------------------------+-------------------------------

Comment (by chesio):

 > The type is not unknown, the type is int/float. In fact esc_html will
 convert those to string anyway.

 If you know that something is int/float, why would you want to pass it
 through `esc_html`? Escaping int/float values does not make any sense.

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


More information about the wp-trac mailing list