[wp-trac] [WordPress Trac] #41215: Escaping the value of the srcset attribute

WordPress Trac noreply at wordpress.org
Fri Jun 30 19:13:00 UTC 2017


#41215: Escaping the value of the srcset attribute
--------------------------+-----------------------------
 Reporter:  henry.wright  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Should we be using {{{esc_url()}}} instead of {{{esc_attr()}}} to escape
 the value of the {{{srcset}}} attribute in {{{get_avatar()}}}?

 The value is a URL, so to me it would make sense to use {{{esc_url()}}}.
 That said, there might be a valid reason why {{{esc_attr()}}} is used.

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


More information about the wp-trac mailing list