Opened 16 years ago

Closed 11 years ago

#2630 closed Bug (fixed)

Empty span tags not removed when using Placeholder plugin

Reported by: Niels Noorlander Owned by:
Priority: Normal Milestone:
Component: Core : Output Data Version: 3.0
Keywords: HasPatch Cc:

Description

When using the placeholder plugin, which is part of the standard FCK download, empty XHTML-style span tags no longer get removed.

For example, enter the following HTML in de source view:

<html dir="ltr">
    <head>
        <title>Test</title>
    </head>
    <body>
    	<span style="color: white" />
    </body>
</html>

Switch to WYSIWYG-mode and back to the source. Without the placeholder plugin, the span will be removed. With the plugin enabled, the span will stay, causing unwanted behaviour because of a IE6/7 rendering bug for XHTML span tags.

After some debugging, I've discovered this problem is easily fixed by changing one line in the plugin:

Original code:

    FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;

Fix:

    node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;

And maybe even better;

node = FCKXHtml._AppendChildNodes( node, htmlNode, Boolean( FCKListsLib.NonEmptyBlockElements[ sNodeName ]) ) ;

Ofcourse this fix is not critical to standard FCK functionality, but the placeholder plugin is an interesting example for FCK customization and would be good to fix it.

Kind regards,

Niels Noorlander.

Change History (3)

comment:1 Changed 16 years ago by Artur Formella

Keywords: Confirmed added
Version: FCKeditor 2.6.3FCKeditor 2.4

comment:2 Changed 13 years ago by Krzysztof Studnik

Component: GeneralCore : Output Data
Keywords: HasPatch added
Version: FCKeditor 2.43.0

Confirmed under 3.6.2Trunk with FullPage Edit sample

comment:3 Changed 11 years ago by Piotrek Koszuliński

Resolution: fixed
Status: confirmedclosed

Not reproducible on 4.2.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy