[wp-trac] [WordPress Trac] #41259: Editing an image link in the Editor produces one additional, empty link

WordPress Trac noreply at wordpress.org
Mon Jul 17 15:49:58 UTC 2017


#41259: Editing an image link in the Editor produces one additional, empty link
-----------------------------------------+--------------------
 Reporter:  afercia                      |       Owner:
     Type:  defect (bug)                 |      Status:  new
 Priority:  normal                       |   Milestone:  4.8.1
Component:  Editor                       |     Version:  4.8
 Severity:  normal                       |  Resolution:
 Keywords:  has-screenshots needs-patch  |     Focuses:
-----------------------------------------+--------------------

Comment (by xkon):

 I've been doing some tests trying to tackle this but without getting any
 results as I don't even know where to start, the only files I didn't go
 through was the tinyMCE ones.

 Extra information:

 I've found out that there's always an extra `<a></a>` even when using the
 Link button from the editor ( not editing with the Image Editor ), if you
 do it while on Visual tab and just change to Text you will always see an
 extra empty <a> that is always the 'last' used. So the extra `<a>` gets
 generated either way you try to edit the 'current' link.

 Apparently when you are trying to change the link instead of getting
 replaced it is like creating a new one and moving the image in there, thus
 leaving the old one empty without an `<img>` tag in it. Some times when
 you hit the Update button it gets removed but sometimes it doesn't (
 usually it does not ).

 I don't know if this is a tinyMCE thing or there's somewhere an extra
 function when we Update the posts / pages that doesn't get triggered
 always.

 Hopefully this can help a bit to get this fixed.

 Best regards,
 Konstantinos

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


More information about the wp-trac mailing list