3.7 regression: Fix the width of captioned images inserted into the visual editor.

Pulls some arithmetic outside of some string concatenation to avoid a nasty uglify.js regression: https://github.com/mishoo/UglifyJS2/pull/330.

props LucP.
fixes #25700 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@25921 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-10-26 02:50:02 +00:00
parent 04dd14f3b5
commit 99a4f77ea7
1 changed files with 2 additions and 1 deletions

View File

@ -160,7 +160,8 @@
if ( cls == 'aligncenter' )
div_cls += ' mceIEcenter';
return '<div class="'+div_cls+'"><dl id="'+id+'" class="wp-caption '+cls+'" style="width: '+( 10 + parseInt(w) )+
w = parseInt( w, 10 ) + 10;
return '<div class="'+div_cls+'"><dl id="'+id+'" class="wp-caption '+cls+'" style="width: '+w+
'px"><dt class="wp-caption-dt">'+img+'</dt><dd class="wp-caption-dd">'+cap+'</dd></dl></div>';
});
},