Ticket #5746: 5746.patch

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

     
    239239                        return value.toLowerCase();
    240240                };
    241241        }
    242 
     242        else if ( CKEDITOR.env.gecko )
     243        {
     244                // Disable form elements editing mode in Firefox. (#5746)
     245                defaultDataFilterRules.elements =
     246                {
     247                        input : function( element )
     248                        {
     249                                if ( !element.attributes.type || element.attributes.type == 'text' )
     250                                        element.attributes.contentEditable = "false";
     251                        },
     252                        textarea : function( element )
     253                        {
     254                                element.attributes.contentEditable = "false";
     255                        }
     256                };
     257               
     258                defaultHtmlFilterRules.attributes.contenteditable = function( value, element )
     259                {
     260                        if ( element.name == 'input'
     261                                        && ( !element.attributes.type || element.attributes.type == 'text' )
     262                                        || element.name == 'textarea' )
     263                        {
     264                                return false;
     265                        }
     266                };
     267        }
     268
    243269        var protectAttributeRegex = /<(?:a|area|img|input)[\s\S]*?\s((?:href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+)))/gi;
    244270
    245271        var protectElementsRegex = /(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy