[wp-trac] [WordPress Trac] #50867: An API which encourages automatic escaping of HTML

WordPress Trac noreply at wordpress.org
Thu Aug 6 09:02:05 UTC 2020


#50867: An API which encourages automatic escaping of HTML
-------------------------------------------------+-------------------------
 Reporter:  noisysocks                           |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  General                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-unit-tests needs-    |     Focuses:
  docs dev-feedback 2nd-opinion                  |
-------------------------------------------------+-------------------------

Comment (by talldanwp):

 A big yes from me. Concatenating HTML is error-prone for the reasons you
 mention, this looks like it'd make the process safer and also provide a
 better structure for building markup.

 The implementation also doesn't look too complicated.

 I feel like it'd be good to also escape the result of `wp_classnames`, as
 there's potential for it to be used separately from `wp_el`.

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


More information about the wp-trac mailing list