Make WordPress Core

Changeset 33591


Ignore:
Timestamp:
08/06/2015 08:57:31 PM (9 years ago)
Author:
markjaquith
Message:

Only use a bare URL when the link text field is used.

Fixes bug that would remove images on edit, in some circumstances.

fixes #33293
props azaozz

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/wplink.js

    r33588 r33591  
    366366
    367367            link = getLink();
    368             text = inputs.text.val() || attrs.href;
     368
     369            if ( inputs.wrap.hasClass( 'has-text-field' ) ) {
     370                text = inputs.text.val() || attrs.href;
     371            }
    369372
    370373            if ( link ) {
Note: See TracChangeset for help on using the changeset viewer.