Skip to content

Commit d232212

Browse files
committed
Merge branch 't/13690'
2 parents 6f07d5d + 103853d commit d232212

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Fixed Issues:
1818
* [#13533](http://dev.ckeditor.com/ticket/13533): Fixed: No progress during upload.
1919
* [#13680](http://dev.ckeditor.com/ticket/13680): Fixed: The parser should allow `<h1-6>` to be a child of the `<summary>` element.
2020
* [#11724](http://dev.ckeditor.com/ticket/11724): [Touch devices] Fixed: Drop-downs often hide right after opening them.
21+
* [#13690](http://dev.ckeditor.com/ticket/13690): Fixed: Copying content from IE to Chrome adding extra paragraph.
2122

2223
Other Changes:
2324

plugins/clipboard/plugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,8 +2081,8 @@
20812081
}
20822082

20832083
this._ = {
2084-
metaRegExp: /^<meta.*?>/,
2085-
bodyRegExp: /<body(?:[\s\S]*?)>([\s\S]*)<\/body>/,
2084+
metaRegExp: /^<meta.*?>/i,
2085+
bodyRegExp: /<body(?:[\s\S]*?)>([\s\S]*)<\/body>/i,
20862086
fragmentRegExp: /<!--(?:Start|End)Fragment-->/g,
20872087

20882088
data: {},

tests/plugins/clipboard/datatransfer.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* bender-tags: editor,unit,clipboard */
1+
/* bender-tags: editor,unit,clipboard,13690 */
22
/* bender-ckeditor-plugins: toolbar,clipboard */
33
/* bender-include: _helpers/pasting.js */
44

@@ -298,6 +298,25 @@ bender.test( {
298298
assert.areSame( 'foo<b>bom</b>xbar', dataTransfer.getData( 'text/html' ) );
299299
},
300300

301+
'test getData body filter uppercase tags': function() {
302+
if ( !CKEDITOR.plugins.clipboard.isCustomDataTypesSupported ) {
303+
assert.ignore();
304+
}
305+
306+
var nativeData = bender.tools.mockNativeDataTransfer();
307+
nativeData.setData( 'text/html',
308+
'<HTML>' +
309+
'<BODY foo="bar" bar=foo bom=\'bim\'>' +
310+
'<!--StartFragment-->foo<B>bom</B>x' +
311+
'bar<!--EndFragment-->' +
312+
'</BODY>' +
313+
'</HTML>' );
314+
315+
var dataTransfer = new CKEDITOR.plugins.clipboard.dataTransfer( nativeData );
316+
317+
assert.areSame( 'foo<B>bom</B>xbar', dataTransfer.getData( 'text/html' ) );
318+
},
319+
301320
'test getData body filter for tables': function() {
302321
if ( !CKEDITOR.plugins.clipboard.isCustomDataTypesSupported ) {
303322
assert.ignore();

0 commit comments

Comments
 (0)