Skip to content
Permalink
Browse files

Merge branch 't/10867'

  • Loading branch information...
adelura committed Jun 11, 2014
2 parents 449b491 + ca7fd38 commit 91779e80a9795d62394a1a36461d16384559ab40
Showing with 20 additions and 2 deletions.
  1. +1 −0 CHANGES.md
  2. +1 −1 plugins/image/dialogs/image.js
  3. +18 −1 tests/plugins/image/image.js
@@ -5,6 +5,7 @@ CKEditor 4 Changelog

Fixed Issues:

* [#10867](http://dev.ckeditor.com/ticket/10867): Fixed: Issue with setting encoded URI as image's link.
* [#10091](http://dev.ckeditor.com/ticket/10091): Blockquote should be treated like an object by the styles system. Thanks to [dan-james-deeson](https://github.com/dan-james-deeson)!
* [#11983](http://dev.ckeditor.com/ticket/11983): Fixed: Clicking a nested widget does not focus it. Additionally, performance of the [`widget.repository.getByElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-getByElement) method has been improved.
* [#12000](http://dev.ckeditor.com/ticket/12000): Fixed: Nested widgets should be initialized on [`editor.setData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setData) and [`nestedEditable.setData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.nestedEditable-method-setData).
@@ -963,7 +963,7 @@
commit: function( type, element ) {
if ( type == LINK ) {
if ( this.getValue() || this.isChanged() ) {
var url = decodeURI( this.getValue() );
var url = this.getValue();
element.data( 'cke-saved-href', url );
element.setAttribute( 'href', url );

@@ -1,5 +1,5 @@
/* bender-tags: editor,unit */
/* bender-ckeditor-plugins: image,button,toolbar */
/* bender-ckeditor-plugins: image,button,toolbar,link */

bender.editor = { config : { autoParagraph : false } };

@@ -314,6 +314,23 @@ bender.test(
'<p><img align="right" src="http://test/x" /></p>'
);
} );
},

// #10867
'test set encoded URI as image\'s link': function() {
var bot = this.editorBot,
uri = 'http://ckeditor.dev/?q=%C5rsrapport';

bot.setHtmlWithSelection( '<p>[<img src="' + SRC + '" />]</p>' );
bot.dialog( 'image', function( dialog ) {
var linkInput = dialog.getContentElement( 'Link', 'txtUrl' );

linkInput.setValue( uri );

dialog.getButton( 'ok' ).click();

assert.areSame( '<p><a href="' + uri + '"><img src="' + SRC + '" /></a></p>', bot.editor.getData() );
} );
}
} );

0 comments on commit 91779e8

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