Skip to content
Permalink
Browse files

Merge branch 't/13003' into major

  • Loading branch information...
Reinmar committed May 11, 2015
2 parents d31d1be + 9f1b78c commit 26b9d35d175bd6cb933a4fa3adb3ae96e63f3299
@@ -9,6 +9,7 @@ Fixed Issues:
* [#13158](http://dev.ckeditor.com/ticket/13158): Fixed: Error after canceling dialog when creating a widget.
* [#13197](http://dev.ckeditor.com/ticket/13197): Fixed: Linked inline image2's alignment class is not transferred to widget wrapper.
* [#13199](http://dev.ckeditor.com/ticket/13199): Fixed: Embedsemantic does not support widget classes.
* [#13003](http://dev.ckeditor.com/ticket/13003): Fixed: Anchors are uploaded when moving them by drag and drop.
* Toolbar configurators:
* [#13185](http://dev.ckeditor.com/ticket/13185): Fixed: Wrong position of the suggestion box if there is not enough space below the caret.
* [#13138](http://dev.ckeditor.com/ticket/13138): Fixed: The "Toggle empty elements" button label is unclear.
@@ -80,10 +80,11 @@
img = imgs.getItem( i );

// Image have to contain src=data:...
var isDataInSrc = img.getAttribute( 'src' ) && img.getAttribute( 'src' ).substring( 0, 5 ) == 'data:';
var isDataInSrc = img.getAttribute( 'src' ) && img.getAttribute( 'src' ).substring( 0, 5 ) == 'data:',
isRealObject = img.data( 'cke-realelement' ) === null;

// We are not uploading images in non-editable blocs.
if ( isDataInSrc && !img.data( 'cke-upload-id' ) && !img.isReadOnly( 1 ) ) {
// We are not uploading images in non-editable blocs and fake objects (#13003).
if ( isDataInSrc && isRealObject && !img.data( 'cke-upload-id' ) && !img.isReadOnly( 1 ) ) {
var loader = editor.uploadsRepository.create( img.getAttribute( 'src' ) );
loader.upload( uploadUrl );

@@ -443,7 +443,24 @@
} );
} );

wait();
},

'test prevent upload fake elements (#13003)': function() {
var editor = this.editors.inline,
createspy = sinon.spy( editor.uploadsRepository, 'create' );

editor.fire( 'paste', {
dataValue: '<img src="data:image/gif;base64,aw==" alt="nothing" data-cke-realelement="some" />'
} );

editor.once( 'afterPaste', function() {
resume( function() {
assert.isTrue( createspy.notCalled );
} );
} );

wait();
}
} );
} )();
} )();
@@ -1,6 +1,6 @@
@bender-tags: clipboard, widget, filetools
@bender-ui: collapsed
@bender-ckeditor-plugins: wysiwygarea, toolbar, undo, uploadwidget, basicstyles, image, uploadimage, font, stylescombo, basicstyles, format, maximize, blockquote, list, table, resize, elementspath, justify
@bender-ckeditor-plugins: wysiwygarea, toolbar, undo, uploadwidget, basicstyles, image, uploadimage, font, stylescombo, basicstyles, format, maximize, blockquote, list, table, resize, elementspath, justify, link
@bender-include: _helpers/xhr.js
Test if photo uploading works properly:
@@ -11,5 +11,6 @@ Test if photo uploading works properly:
* It should be possible to format text and copy image during upload.
* If image is removed during upload, the process should be aborted.
* Check if you see a message about the progress, success and abort.
* Try to D&D elements which are not intended to be uploaded (e.g. empty anchor).
**Note:** This test use upload mock which will show you *Lena* instead of the real uploaded image.
**Note:** This test use upload mock which will show you *Lena* instead of the real uploaded image.

0 comments on commit 26b9d35

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