X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fstyles%2Fplugin.js;h=2e82127c37852f2d42f11416d1bdc2fe0a9ef7c5;hp=1d468ad4a4c0ccc938cfcbbfdcf3aff33caa2079;hb=8761695d9b70afe75905deaac88f78c1f8aeb32d;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91 diff --git a/_source/plugins/styles/plugin.js b/_source/plugins/styles/plugin.js index 1d468ad..2e82127 100644 --- a/_source/plugins/styles/plugin.js +++ b/_source/plugins/styles/plugin.js @@ -267,7 +267,7 @@ CKEDITOR.STYLE_OBJECT = 3; stylesText = stylesText.replace( semicolonFixRegex, ';' ); for ( var style in stylesDef ) - stylesText += style + ':' + stylesDef[ style ] + ';'; + stylesText += ( style + ':' + stylesDef[ style ] ).replace( semicolonFixRegex, ';' ); // Browsers make some changes to the style when applying them. So, here // we normalize it to the browser format. @@ -1200,6 +1200,7 @@ CKEDITOR.STYLE_OBJECT = 3; // Compensate tail semi-colon. return styleText.replace( /\s*([;:])\s*/, '$1' ) .replace( /([^\s;])$/, '$1;') + .replace( /,\s+/g, ',' ) // Trimming spaces after comma (e.g. font-family name)(#4107). .toLowerCase(); }