Skip to content

Commit b373ace

Browse files
committed
Merge branch 't/12311'
2 parents 558f516 + 5148dff commit b373ace

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Fixed Issues:
77

88
* [#12315](http://dev.ckeditor.com/ticket/12315): Fixed: Marked [`config.autoParagraph`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-autoParagraph) as deprecated.
99
* [#12113](http://dev.ckeditor.com/ticket/12113): Fixed: Code snippet should be presented in elements path as "codesnippet".
10+
* [#12311](http://dev.ckeditor.com/ticket/12311): Fixed: Remove format should also remove `<cite>` elements.
1011

1112
## CKEditor 4.4.4
1213

plugins/removeformat/plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ CKEDITOR.editor.prototype.addRemoveFormatFilter = function( func ) {
169169
* @cfg
170170
* @member CKEDITOR.config
171171
*/
172-
CKEDITOR.config.removeFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var';
172+
CKEDITOR.config.removeFormatTags = 'b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var';
173173

174174
/**
175175
* A comma separated list of elements attributes to be removed when executing

tests/plugins/removeformat/plugin.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,20 @@ bender.test(
129129
bender.assert.isInnerHtmlMatching( expected, data );
130130
},
131131

132+
// #12311
133+
'test remove format for cite element': function() {
134+
this.editorBot.setHtmlWithSelection( '<p>[foo <cite>bar</cite> baz]</p>' );
135+
this.editor.execCommand( 'removeFormat' );
136+
137+
assert.areEqual( '<p>foo bar baz</p>', this.editor.getData(), 'Cite element should be removed.' );
138+
},
139+
132140
'test editor#addRemoveFormatFilter': function() {
133141
bender.editorBot.create( {
134142
name: 'test_editor2',
135143
config: { allowedContent: true }
136144
}, function( bot ) {
137-
bot.setHtmlWithSelection( '[<p><span style="color:red">foo</span> <b>bar</b></p>]' );
145+
bot.setHtmlWithSelection( '<p>[<span style="color:red">foo</span> <b>bar</b>]</p>' );
138146

139147
bot.editor.addRemoveFormatFilter( function( element ) {
140148
return !element.is( 'b' ); // Don't remove 'b' elements.

0 commit comments

Comments
 (0)