Ticket #3884: 3884.patch

File 3884.patch, 2.5 KB (added by Garry Yao, 15 years ago)
  • _source/tests/plugins/htmldataprocessor/htmldataprocessor.html

     
    270270                                dataProcessor.toDataFormat( protectedHtml ) );
    271271                },
    272272
     273                /**
     274                 * Test empty value attributes.
     275                 */
     276                test_ticket_3884 : function()
     277                {
     278                        var editor = CKEDITOR.instances.editor1,
     279                                dataProcessor = editor.dataProcessor;
     280                        dataProcessor.writer = new CKEDITOR.htmlParser.basicWriter();
    273281
     282                        assert.areSame( '<p><a href="" name="">emptylink</a></p>',
     283                                dataProcessor.toDataFormat( dataProcessor.toHtml( '<p><a href="" name="">emptylink</a></p>' ) ) );
     284                },
     285
    274286                name : document.title
    275287        };
    276288})() );
    277289
    278 //window.onload = testCase.test_ticket_3407;
     290//window.onload = testCase.test_ticket_3884;
    279291        //]]>
    280292        </script>
    281293</head>
  • _source/plugins/htmldataprocessor/plugin.js

     
    114114
    115115                                        if ( attribs )
    116116                                        {
    117                                                 // Remove duplicates that have been saved with our
    118                                                 // special names.
    119                                                 if ( attribs._cke_saved_name )
    120                                                         delete attribs.name;
    121                                                 if ( attribs._cke_saved_href )
    122                                                         delete attribs.href;
    123                                                 if ( attribs._cke_saved_src )
    124                                                         delete attribs.src;
    125                                         }
     117                                                var attributeNames = [ 'name', 'href', 'src' ],
     118                                                        savedAttributeName;
     119                                                for ( var i = 0 ; i < attributeNames.length ; i++ )
     120                                                {
     121                                                        savedAttributeName = '_cke_saved_' + attributeNames[ i ];
     122                                                        savedAttributeName in attribs && ( delete attribs[ savedAttributeName ] );
     123                                                }
     124                                        }
    126125                                },
    127126
    128127                                embed : function( element )
  • CHANGES.html

     
    9292                        source code.</li>
    9393                <li><a href="http://dev.fckeditor.net/ticket/3639">#3639</a> : Button size was inconsistent.</li>
    9494                <li><a href="http://dev.fckeditor.net/ticket/3874">#3874</a> : Paste as plain text in Safari loosing lines.</li>
     95                <li><a href="http://dev.fckeditor.net/ticket/3884">#3884</a> : Empty "href" attribute was duplicated on output data.</li>
    9596        </ul>
    9697        <h3>
    9798                CKEditor 3.0 RC</h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy