#2630: Empty span tags not removed when using Placeholder plugin
---------------------+------------------------------------------------------
 Reporter:  NielsN   |       Owner:                 
     Type:  Bug      |      Status:  new            
 Priority:  Normal   |   Milestone:                 
Component:  General  |     Version:  FCKeditor 2.6.3
 Keywords:           |  
---------------------+------------------------------------------------------
 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.

-- 
Ticket URL: <http://dev.fckeditor.net/ticket/2630>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac

Reply via email to