Make WordPress Core

Changeset 27426


Ignore:
Timestamp:
03/06/2014 12:12:08 AM (12 years ago)
Author:
azaozz
Message:

TinyMCE: when parsing [caption] and the width attribute is missing, recreate it from the image tag width, fixes #23103

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js

    r27276 r27426  
    3535                        id = ( id && id[1] ) ? id[1] : '';
    3636                        cls = ( cls && cls[1] ) ? cls[1] : 'alignnone';
    37                         w = ( w && w[1] ) ? w[1] : '';
     37
     38                        if ( ! w && img ) {
     39                                w = img.match( /width=['"]([0-9]*)['"]/ );
     40                        }
     41
     42                        if ( w && w[1] ) {
     43                                w = w[1];
     44                        }
    3845
    3946                        if ( ! w || ! cap ) {
Note: See TracChangeset for help on using the changeset viewer.