[wp-trac] [WordPress Trac] #41919: Image Widget Custom Link Target

WordPress Trac noreply at wordpress.org
Wed Sep 20 12:09:35 UTC 2017


#41919: Image Widget Custom Link Target
----------------------------------------+------------------
 Reporter:  Nenad Obradovic             |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  4.9
Component:  Widgets                     |     Version:  4.8
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+------------------

Comment (by subrataemfluence):

 Good catch! Thanks for the ticket.

 However, looking at HTML5 coding standard the only two values allowed for
 target attribute are `_blank` and `_self`.

 Values like `_top`, `_parent` and `<frame_name>` are now deprecated in
 HTML5 standard.

 http://html.com/attributes/a-target/

 The line in question is also checking only for the value `_blank`, keeping
 above in mind. So, how about we do not add the `target` attribute at all
 if the value is not `_blank` since `_self` is default if no target
 attribute is set.

 I have uploaded a modified diff. Please let me know if this makes sense.

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


More information about the wp-trac mailing list