Skip to content
Permalink
Browse files

Merge branch 't/10097' into major

  • Loading branch information...
oleq committed Feb 20, 2013
2 parents 013be3c + ebaf7c6 commit 69dcd98f4b711c2dc44741d4a823b95d8ccbde6b
@@ -207,7 +207,7 @@
fragment.forEach( function( el ) {
if ( el.type == CKEDITOR.NODE_ELEMENT )
filterFn( el, rules, transformations, toBeRemoved, toHtml );
else if ( el.type == CKEDITOR.NODE_COMMENT && el.value.match( /^{cke_protected}(?!{C})/ ) ) {
else if ( el.type == CKEDITOR.NODE_COMMENT && el.value.match( /^\{cke_protected\}(?!\{C\})/ ) ) {
if ( !filterProtectedElement( el, protectedRegexs, filterFn, rules, transformations, toHtml ) )
toBeRemoved.push( el );
}
@@ -596,7 +596,7 @@
// Return true when all items are valid.
function applyRuleToArray( itemsRule, items, validItems ) {
if ( !itemsRule )
return;
return false;

// True means that all elements of array are accepted (the asterix was used for classes).
if ( itemsRule === true )
@@ -613,7 +613,7 @@

function applyRuleToHash( itemsRule, items, validItems ) {
if ( !itemsRule )
return;
return false;

if ( itemsRule === true )
return true;
@@ -667,7 +667,7 @@

for ( i = 0; i < props.length; ++i ) {
prop = props[ i ];
if ( prop.indexOf( '!' ) == 0 )
if ( prop.indexOf( '!' ) === 0 )
req.push( ( props[ i ] = prop.slice( 1 ) ) );
}

@@ -677,7 +677,7 @@
// Filter element protected with a comment.
// Returns true if protected content is ok, false otherwise.
function filterProtectedElement( comment, protectedRegexs, filterFn, rules, transformations, toHtml ) {
var source = decodeURIComponent( comment.value.replace( /^{cke_protected}/, '' ) ),
var source = decodeURIComponent( comment.value.replace( /^\{cke_protected\}/, '' ) ),
protectedFrag,
toBeRemoved = [],
node, i, match;
@@ -898,7 +898,7 @@
return {};

var keys = str.split( /\s*,\s*/ ).sort(),
obj = {}
obj = {};

while ( keys.length )
obj[ keys.shift() ] = TEST_VALUE;
@@ -1004,7 +1004,7 @@
}

// < elements >< styles, attributes and classes >< separator >
var rulePattern = /^([a-z0-9*\s]+)((?:\s*{[!\w\-,\s\*]+}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,
var rulePattern = /^([a-z0-9*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,
groupsPatterns = {
styles: /{([^}]+)}/,
attrs: /\[([^\]]+)\]/,
@@ -1179,6 +1179,8 @@
return value in validator;
};
}

return false;
}

//
@@ -152,7 +152,7 @@
* @returns {String}
*/
toHtml: function( data, context, fixForBody ) {
var editor = this.editor
var editor = this.editor;

// Fall back to the editable as context if not specified.
if ( !context && context !== null )
@@ -59,6 +59,8 @@ CKEDITOR.htmlParser.comment.prototype = CKEDITOR.tools.extend( new CKEDITOR.html
}

this.value = comment;

return true;
},

/**
@@ -195,8 +195,7 @@ CKEDITOR.htmlParser.cssStyle = function() {
// different type, then make the replacement filter itself.
if ( element.type != CKEDITOR.NODE_ELEMENT ) {
this.replaceWith( element );
element.filter( filter );
return;
return false;
}

// This indicate that the element has been dropped by
@@ -240,6 +239,8 @@ CKEDITOR.htmlParser.cssStyle = function() {

if ( !element.isEmpty )
this.filterChildren( filter );

return true;
},

/**
@@ -32,7 +32,7 @@ CKEDITOR.plugins.add( 'format', {
}

// Hide entire combo when all formats are rejected.
if ( stylesCount == 0 )
if ( stylesCount === 0 )
return;

editor.ui.addRichCombo( 'Format', {
@@ -95,6 +95,8 @@
doc.body.innerHTML += '';
}, 0 );
}

return true;
}
};

@@ -177,7 +177,6 @@
}
styles = {};
stylesList = [];
loadStylesSet();
}
});
}

0 comments on commit 69dcd98

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