Make WordPress Core

Ticket #39912: 39912.diff

File 39912.diff, 814 bytes (added by afercia, 8 years ago)
  • src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js

     
    389389
    390390                dom.setAttribs( imageNode, attrs );
    391391
     392                // Preserve empty alt attributes.
     393                if ( ! dom.getAttrib( imageNode, 'alt' ) ) {
     394                        dom.$$( imageNode ).attr( 'alt', '' );
     395                }
     396
    392397                linkAttrs = {
    393398                        href: imageData.linkUrl,
    394399                        rel: imageData.linkRel || null,
     
    10261031        editor.on( 'beforeGetContent', function( event ) {
    10271032                if ( event.format !== 'raw' ) {
    10281033                        editor.$( 'img[id="__wp-temp-img-id"]' ).attr( 'id', null );
    1029                 }       
     1034                }
    10301035        });
    10311036
    10321037        editor.on( 'BeforeSetContent', function( event ) {