[wp-trac] [WordPress Trac] #59337: Change the escape esc_attr() to esc_url()

WordPress Trac noreply at wordpress.org
Thu Sep 14 05:40:07 UTC 2023


#59337: Change the escape esc_attr() to esc_url()
-----------------------------+-------------------------------
 Reporter:  truptikanzariya  |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  General          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:  coding-standards
-----------------------------+-------------------------------

Comment (by jakariaistauk):

 hi @truptikanzariya
 Your change to use esc_url instead of esc_attr makes a lot of sense. It's
 a safer option for handling URLs in this context. on the same file `"wp-
 admin/user-edit.php:261"` `esc_url` is used instead of `esc_attr`. thanks
 for your change.

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


More information about the wp-trac mailing list