Skip to content

Commit

Permalink
Merge branch 't/10867'
Browse files Browse the repository at this point in the history
  • Loading branch information
adelura committed Jun 11, 2014
2 parents 449b491 + ca7fd38 commit 91779e8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion plugins/image/dialogs/image.js
Expand Up @@ -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 );

Expand Down
19 changes: 18 additions & 1 deletion tests/plugins/image/image.js
@@ -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 } };

Expand Down Expand Up @@ -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() );
} );
}
} );

Expand Down

0 comments on commit 91779e8

Please sign in to comment.