TinyMCE: when parsing [caption] and the width attribute is missing, recreate it from the image tag width, fixes #23103
git-svn-id: https://develop.svn.wordpress.org/trunk@27426 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1de1f27249
commit
e3b214f047
@ -34,7 +34,14 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
|
||||
|
||||
id = ( id && id[1] ) ? id[1] : '';
|
||||
cls = ( cls && cls[1] ) ? cls[1] : 'alignnone';
|
||||
w = ( w && w[1] ) ? w[1] : '';
|
||||
|
||||
if ( ! w && img ) {
|
||||
w = img.match( /width=['"]([0-9]*)['"]/ );
|
||||
}
|
||||
|
||||
if ( w && w[1] ) {
|
||||
w = w[1];
|
||||
}
|
||||
|
||||
if ( ! w || ! cap ) {
|
||||
return c;
|
||||
|
Loading…
Reference in New Issue
Block a user