Ticket #7322: 7322.patch

File 7322.patch, 913 bytes (added by Garry Yao, 13 years ago)
  • _source/plugins/styles/plugin.js

     
    14501450                else
    14511451                        styleText = unparsedCssText;
    14521452
     1453                // Normalize font-family property, ignore quotes and being case insensitive. (#7322)
     1454                // http://www.w3.org/TR/css3-fonts/#font-family-the-font-family-property
     1455                styleText = styleText.replace( /(font-family:)(.*?)(?=;|$)/, function ( match, prop, val )
     1456                {
     1457                        var names = val.split( ',' );
     1458                        for ( var i = 0; i < names.length; i++ )
     1459                                names[ i ] = CKEDITOR.tools.trim( names[ i ].replace( /["']/g, '' ) );
     1460                        return prop + names.join( ',' );
     1461                });
     1462
    14531463                // Shrinking white-spaces around colon and semi-colon (#4147).
    14541464                // Compensate tail semi-colon.
    14551465                return styleText.replace( /\s*([;:])\s*/, '$1' )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy