TinyMCE: when parsing [caption] and the width attribute is missing, recreate it from the image tag width, fixes #23103
Built from https://develop.svn.wordpress.org/trunk@27426 git-svn-id: http://core.svn.wordpress.org/trunk@27273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
192afe238a
commit
62d68cc992
|
@ -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;
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Loading…
Reference in New Issue