[wp-trac] [WordPress Trac] #41215: Escaping the value of the srcset attribute
    WordPress Trac 
    noreply at wordpress.org
       
    Fri Jun 30 21:01:59 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        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------
Comment (by joemcgill):
 You certainly could, but seems a bit overkill to me to run the extra
 escaping function on a text string that isn't variable. I thought about
 doing `srcset="%s 2x"` and then use `esc_url` for the image source URL
 only, but handling the whole attribute value as a string replacement means
 we only have to change one line if we decide to format the `srcset`
 differently in the future.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41215#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
    
    
More information about the wp-trac
mailing list