[wp-trac] [WordPress Trac] #34826: Links in images that link to attachment page are outputting with double rel attribute, wp_ajax_send_attachment_to_editor()

WordPress Trac noreply at wordpress.org
Thu Dec 3 15:57:40 UTC 2015


#34826: Links in images that link to attachment page are outputting with double rel
attribute, wp_ajax_send_attachment_to_editor()
--------------------------+-----------------------------
 Reporter:  lucymtc       |       Owner:  wonderboymusic
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  4.4
Component:  Media         |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------
Changes (by swissspidy):

 * owner:   => wonderboymusic
 * status:  new => assigned
 * milestone:  Awaiting Review => 4.4


Comment:

 Hey there,

 Thanks for your report and the patch!

 Looks like that was introduced in [34259] and [34260].

 As you can see from that commit, the `$rel` variable is used further down
 like this for other attachments that aren't images, audio or video:

 `$html = '<a href="' . esc_url( $url ) . '"' . $rel . '>' . $html .
 '</a>';`

 So that needs to be changed as well. See my updated patch.

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


More information about the wp-trac mailing list