Ticket #4746: 4746.patch

File 4746.patch, 1.6 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/wysiwygarea/plugin.js

     
    2424                        this.fire( 'saveSnapshot' );
    2525
    2626                        var selection = this.getSelection(),
     27                                start = selection.getStartElement(),
    2728                                data = evt.data;
    2829
     30                        // Creating a 'has inline started' parsing context for the inserted HTML,
     31                        // This's because we expect leading spaces are left untouched. (#4767)
     32                        data = '<span cke_temp="1">\ufeff</span>' + data;
     33                        // Creating proper context for insertion happens inside preformatted block.
     34                        if ( start.hasAscendant( 'pre', true ) )
     35                                data = '<pre cke_context="1">' + data + '</pre>';
     36
    2937                        if ( this.dataProcessor )
    3038                                data = this.dataProcessor.toHtml( data );
    3139
  • _source/plugins/htmldataprocessor/plugin.js

     
    8484        delete blockLikeTags.pre;
    8585        var defaultDataFilterRules =
    8686        {
     87                elements :
     88                {
     89                        '$' : function( element )
     90                        {
     91                                var attribs = element.attributes;
     92                                // Elements marked as temporary are to be ignored.
     93                                if ( attribs.cke_temp )
     94                                        return false;
     95
     96                                // Elements marked as contextual keep only contents. (#4746)
     97                                if ( attribs.cke_context )
     98                                        delete element.name;
     99
     100                                return element;
     101                        }
     102                },
    87103                attributeNames :
    88104                [
    89105                        // Event attributes (onXYZ) must not be directly set. They can become
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy