Ticket #3829: 3829.patch

File 3829.patch, 2.6 KB (added by Garry Yao, 15 years ago)
  • _source/plugins/htmldataprocessor/plugin.js

     
    9191        for ( i in blockLikeTags )
    9292                defaultDataBlockFilterRules.elements[ i ] = extendBlockForDisplay;
    9393
    94         /**
    95          * IE sucks with dynamic 'name' attribute after element is created, '_cke_saved_name' is used instead for this attribute.
    96          */
    97         var removeName = function( element )
    98         {
    99                 var attribs = element.attributes;
    100 
    101                 if ( attribs._cke_saved_name )
    102                         delete attribs.name;
    103         };
    104 
    10594        var defaultHtmlFilterRules =
    10695                {
    10796                        elementNames :
     
    124113
    125114                        elements :
    126115                        {
     116                                $ : function( element )
     117                                {
     118                                        // Remove duplicated attributes - #3789.
     119                                        var attribs = element.attributes;
     120
     121                                        if ( attribs )
     122                                        {
     123                                                // IE sucks with dynamic 'name' attribute after element is created, '_cke_saved_name' is used instead for this attribute.
     124                                                if ( attribs._cke_saved_name )
     125                                                        delete attribs.name;
     126                                                if ( attribs._cke_saved_href )
     127                                                        delete attribs.href;
     128                                                if ( attribs._cke_saved_src )
     129                                                        delete attribs.src;
     130                                        }
     131                                },
     132
    127133                                embed : function( element )
    128134                                {
    129135                                        var parent = element.parent;
     
    137143                                        }
    138144                                },
    139145
    140                                 img : function( element )
    141                                 {
    142                                         var attribs = element.attributes;
    143 
    144                                         if ( attribs._cke_saved_name )
    145                                                 delete attribs.name;
    146                                         if ( attribs._cke_saved_src )
    147                                                 delete attribs.src;
    148                                 },
    149 
    150146                                a : function( element )
    151147                                {
    152                                         var attribs = element.attributes;
    153 
    154                                         if ( attribs._cke_saved_name )
    155                                                 delete attribs.name;
    156                                         if ( attribs._cke_saved_href )
    157                                                 delete attribs.href;
    158                                 },
     148                                        if ( !( element.children.length || element.attributes.name ) )
     149                                                return false;
     150                                }
     151                        },
    159152
    160                                 input : removeName,
    161                                 textarea : removeName,
    162                                 select : removeName,
    163                                 form : removeName
    164                         },
    165 
    166153                        attributes :
    167154                        {
    168155                                'class' : function( value, element )
  • CHANGES.html

     
    6262                        </li>
    6363                <li><a href="http://dev.fckeditor.net/ticket/3821">#3821</a> : Fixed an issue with JAWS in which
    6464                        toolbar items are read inconsistently between virtual cursor modes.</li>
     65                <li><a href="http://dev.fckeditor.net/ticket/3829">#3829</a> : Fixed remove empty link on output data.</li>
    6566        </ul>
    6667        <h3>
    6768                CKEditor 3.0 RC</h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy