Ticket #6446: 6446.patch

File 6446.patch, 1.2 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/htmldataprocessor/plugin.js

     
    238238        for ( i in blockLikeTags )
    239239                defaultHtmlBlockFilterRules.elements[ i ] = extendBlockForOutput;
    240240
     241        // IE <= 8 outputs style property name in capital, convert
     242                // them back to lower case.
    241243        if ( CKEDITOR.env.ie )
    242244        {
    243                 // IE outputs style attribute in capital letters. We should convert
    244                 // them back to lower case.
    245                 defaultHtmlFilterRules.attributes.style = function( value, element )
    246                 {
    247                         return value.toLowerCase();
    248                 };
    249         }
     245        var div = CKEDITOR.document.createElement( 'div' );
     246        div.setStyle('color', "red" );
     247        if ( /COLOR/.test( div.getAttribute( 'style' ) ) )
     248        {
     249            var toLowerCase = function( value ) { return value.toLowerCase(); };
     250            defaultHtmlFilterRules.attributes.style = function( value )
     251            {
     252                return value.replace( /[A-Za-z0-9-_]+\s*(:?\:)/g, toLowerCase );
     253            };
     254        }
     255        }
    250256
    251257        function protectReadOnly( element )
    252258        {
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy