Skip to content
Permalink
Browse files

Merge branch 't/11258'

  • Loading branch information...
pjasiun committed Dec 5, 2013
2 parents 4362056 + c240965 commit 59c27581a0b81e965fd5ccf7b1a0d349cb2bebb4
Showing with 7 additions and 5 deletions.
  1. +7 −5 core/style.js
@@ -1191,7 +1191,7 @@ CKEDITOR.STYLE_OBJECT = 3;
}

// Removes a style from an element itself, don't care about its subtree.
function removeFromElement( element ) {
function removeFromElement( element, keepDataAttrs ) {
var def = this._.definition,
attributes = def.attributes,
styles = def.styles,
@@ -1205,8 +1205,8 @@ CKEDITOR.STYLE_OBJECT = 3;
if ( ( attName == 'class' || this._.definition.fullMatch ) && element.getAttribute( attName ) != normalizeProperty( attName, attributes[ attName ] ) )
continue;

// Do not touch data-* attributes (#11011).
if ( attName.slice( 0, 5 ) == 'data-' )
// Do not touch data-* attributes (#11011) (#11258).
if ( keepDataAttrs && attName.slice( 0, 5 ) == 'data-' )
continue;

removeEmpty = element.hasAttribute( attName );
@@ -1237,7 +1237,9 @@ CKEDITOR.STYLE_OBJECT = 3;
}
}

// Removes a style from inside an element.
// Removes a style from inside an element. Called on applyStyle to make cleanup
// before apply. During clean up this function keep data-* attribute in contrast
// to removeFromElement.
function removeFromInsideElement( element ) {
var def = this._.definition,
attribs = def.attributes,
@@ -1251,7 +1253,7 @@ CKEDITOR.STYLE_OBJECT = 3;

// Do not remove elements which are read only (e.g. duplicates inside widgets).
if ( !innerElement.isReadOnly() )
removeFromElement.call( this, innerElement );
removeFromElement.call( this, innerElement, true );
}

// Now remove any other element with different name that is

0 comments on commit 59c2758

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