[wp-trac] [WordPress Trac] #56158: I've found an unescaped 'src' of an 'img' tag in 'wp-content/themes/twentyfourteen/header.php’ in line no 39. I think it should be escaped

WordPress Trac noreply at wordpress.org
Wed Jul 6 12:17:51 UTC 2022


#56158: I've found an unescaped 'src' of an 'img' tag in 'wp-
content/themes/twentyfourteen/header.php’ in line no 39. I think it should
be escaped
---------------------------+-------------------------------
 Reporter:  mahbubshovan   |       Owner:  sergeybiryukov
     Type:  defect (bug)   |      Status:  closed
 Priority:  normal         |   Milestone:
Component:  Bundled Theme  |     Version:  trunk
 Severity:  normal         |  Resolution:  invalid
 Keywords:                 |     Focuses:  coding-standards
---------------------------+-------------------------------
Changes (by ocean90):

 * status:  assigned => closed
 * resolution:   => invalid
 * focuses:  administration, coding-standards => coding-standards
 * component:  Themes => Bundled Theme
 * milestone:  Awaiting Review =>


Comment:

 Hello @mahbubshovan, welcome to WordPress Trac!

 `header_image()` doesn't return the image URL but rather prints it
 directly and already uses `esc_url()` before doing that. You can review
 the [https://developer.wordpress.org/reference/functions/header_image/
 source of the function in the code reference].

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


More information about the wp-trac mailing list