Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#10551 closed Bug (wontfix)

span end tag without start tag on paste after cleanupfromword

Reported by: Jeff Fournier Owned by:
Priority: Normal Milestone:
Component: Plugin : Paste from Word Version: 4.1
Keywords: Cc:

Description

If you add a onPaste listener with priority 4 (right after pastefromword) and look at the data you'll see span ending tags (</span>) without the starting ones. This is because of this line in the pasteformword filter :

CKEDITOR.cleanWord = function( data, editor ) {
   ...

  // Remove the dummy spans ( having no inline style ).
  data = data.replace( /<span>/g, '' );

  ...
};

Having closing tags without the starting counterpart can cause some problem in other onPaste listeners with lower priority than pastefromword. For exemple if a listener expect to have valid html.

Doing a second pass of

data = dataProcessor.toHtml( data );
data = dataProcessor.toHtml( data );

would remove the empty span tags correctly.

Change History (2)

comment:1 Changed 6 years ago by Piotrek Koszuliński

Resolution: wontfix
Status: newclosed

This is a known issue in paste from word filter. We're planning to rewrite entire filter at some point (#9991), so this issue will be automatically fixed. Therefore, I'm closing this ticket for now.

comment:2 Changed 6 years ago by Frederico Caldeira Knabben

Component: Core : PastingPlugin : Paste from Word
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy