Skip to content
Permalink
Browse files

Merge branch 't/9675'

  • Loading branch information...
Reinmar committed Nov 20, 2012
2 parents a3e65c2 + 12be80a commit 0e06bd14ed2fc96e5d500e3149e2ae60658db43c
Showing with 14 additions and 6 deletions.
  1. +14 −6 plugins/clipboard/plugin.js
@@ -124,14 +124,22 @@
}

// Strip editable that was copied from inside. (#9534)
if ( data.match( /^<[^<]+cke_editable/i ) ) {
var header, wrapper = new CKEDITOR.dom.element( 'div' );
if ( data.match( /^<[^<]+cke_(editable|contents)/i ) ) {
var tmp,
editable_wrapper,
wrapper = new CKEDITOR.dom.element( 'div' );

wrapper.setHtml( data );
// Verify for sure.
if ( wrapper.getChildCount() == 1 && ( header = wrapper.getFirst() ).hasClass( 'cke_editable' ) )
// Strip editable and bogus <br> (added on FF).
data = header.getHtml().replace( /<br>$/i, '' );
// Verify for sure and check for nested editor UI parts. (#9675)
while ( wrapper.getChildCount() == 1 &&
( tmp = wrapper.getFirst() ) &&
( tmp.hasClass( 'cke_editable' ) || tmp.hasClass( 'cke_contents' ) ) ) {
wrapper = editable_wrapper = tmp;
}

// If editable wrapper was found strip it and bogus <br> (added on FF).
if ( editable_wrapper )
data = editable_wrapper.getHtml().replace( /<br>$/i, '' );
}

if ( CKEDITOR.env.ie ) {

0 comments on commit 0e06bd1

Please sign in to comment.
You can’t perform that action at this time.