[wp-trac] [WordPress Trac] #41259: Editing an image link in the Editor produces one additional, empty link
WordPress Trac
noreply at wordpress.org
Thu Jul 6 11:10:04 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: Awaiting Review
Component: Editor | Version: 4.8
Severity: normal | Keywords: has-screenshots
Focuses: |
--------------------------+-----------------------------
I can reproduce this consistently in WordPress 4.8 but only using Chrome
(v. 59) or Safari (10) and '''only if an image is the first thing in the
post content'''. To reproduce:
- insert an image as first thing in the content
- when inserting the image, link it to the "Attachment Page"
- save the post
- on the front-end, inspect the HTML: everything looks fine
- edit the post and update the image link to, for example, "Media File" or
set a "Custom URL"
- save the post
- inspect the HTML in the front end: the previous link to the "Attachment
Page" is still there (before the image) and it's empty
Seems this happens whatever link is set. Tested on two different machines,
macOS and Windows. Couldn't reproduce using Firefox, so seems something
specific to webkit browsers. Couldn't reproduce in WordPress 4.7.
Note: you can't see the doubled, empty link switching the Editor to "Text
mode" because TinyMCE will strip it out. Not sure why the empty link
doesn't get removed when saving the post.
Screenshots:
[[Image(https://cldup.com/-fHYEoCUPd.png)]]
Happens also with an image after another image:
[[Image(https://cldup.com/0FKdDgTHwr.png)]]
On Windows:
[[Image(https://cldup.com/7SR2nTCIJK.png)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41259>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list