[wp-trac] [WordPress Trac] #25485: Why does esc_attr not double encode entities by default?

WordPress Trac noreply at wordpress.org
Wed Mar 26 16:56:24 UTC 2014


#25485: Why does esc_attr not double encode entities by default?
--------------------------+----------------------
 Reporter:  smerriman     |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Formatting    |     Version:  3.6.1
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------
Changes (by nacin):

 * status:  reopened => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 We're not changing how esc_attr() works. In fact the whole point of it is
 that it does not re-encode. If you want double-encoding, then you should
 use htmlspecialchars() directly.

 Specific bugs related to, for example, option values belong in separate
 tickets.

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


More information about the wp-trac mailing list