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:
Andrew Ozz 2014-03-06 00:13:14 +00:00
parent 192afe238a
commit 62d68cc992
3 changed files with 9 additions and 2 deletions

View File

@ -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