Skip to content
Permalink
Browse files

Merge branch 't/12739'

  • Loading branch information...
Reinmar committed May 29, 2015
2 parents 7157492 + 101bae7 commit 55a9c5bde49e3361c751abe0044fc7fc8dbd0bbf
@@ -5,11 +5,12 @@ CKEditor 4 Changelog

Fixed Issues:

* [#13232](http://dev.ckeditor.com/ticket/13232): [Safari] Fixed: Method [`element.appendText()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-appendText) work properly for empty elements.
* [#13233](http://dev.ckeditor.com/ticket/13233): Fixed: HTMLDataProcessor can process `foo:href` attributes.
* [#12899](http://dev.ckeditor.com/ticket/12899): Fixed: Corrected wrong tag ending for horizontal box definition in the [Dialog User Interface](http://ckeditor.com/addon/dialogui) plugin. Thanks to [mizafish](https://github.com/mizafish)!
* [#13254](http://dev.ckeditor.com/ticket/13254): Fixed: Cannot outdent block after indent when using [Divarea](http://ckeditor.com/addon/divarea) plugin. Thanks to [Jonathan Cottrill](https://github.com/jcttrll)!
* [#13268](http://dev.ckeditor.com/ticket/13268): Fixed: Documentation for `CKEDITOR.dom.text` is incorrect. Thanks to [Ben Kiefer](https://github.com/benkiefer)!
* [#12739](http://dev.ckeditor.com/ticket/12739): Fixed: Link loses inline styles when edited without dialogadvtab. Thanks to [Віталій Крутько](https://github.com/asmforce)!
* [#13232](http://dev.ckeditor.com/ticket/13232): [Safari] Fixed: Method [`element.appendText()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-appendText) work properly for empty elements.
* [#13233](http://dev.ckeditor.com/ticket/13233): Fixed: HTMLDataProcessor can process `foo:href` attributes.
* [#12796](http://dev.ckeditor.com/ticket/12796): Fixed: The [Indent List](http://ckeditor.com/addon/indentlist) plugin unwraps parent `<li>` elements.
* [#12885](http://dev.ckeditor.com/ticket/12885): Added missing [`editor.getData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-getData) parameter documentation.
* [#11982](http://dev.ckeditor.com/ticket/11982): Bullet added in wrong position after the *Enter* key is pressed in a nested list.
@@ -677,12 +677,15 @@
if ( set[ 'data-cke-saved-href' ] )
set.href = set[ 'data-cke-saved-href' ];

var removed = CKEDITOR.tools.extend( {
var removed = {
target: 1,
onclick: 1,
'data-cke-pa-onclick': 1,
'data-cke-saved-name': 1
}, advAttrNames );
};

if ( data.advanced )
CKEDITOR.tools.extend( removed, advAttrNames );

// Remove all attributes which are not currently set.
for ( var s in set )
@@ -0,0 +1,10 @@
<div id="editor">
<p><a href="foo" class="foo" style="border: solid 2px red" tabindex="555">I am your father, Luke!</a></p>
</div>

<script>
CKEDITOR.replace( 'editor', {
allowedContent: true,
removeDialogTabs: 'link:advanced'
} );
</script>
@@ -0,0 +1,7 @@
@bender-tags: link, tc, 4.4.8
@bender-ui: collapsed
@bender-ckeditor-plugins: link,toolbar,wysiwygarea,sourcearea

1. Edit the link (change URL to "bar").
2. Switch to source mode.
3. Link should contain `class="foo"`, red border, `tabindex="555"` and the `href` that you set.
@@ -67,22 +67,10 @@
bender.test( {
'test link attributes - no link': function() {
assertLink( this.editorBot, '', {}, {}, [
'accessKey',
'charset',
'class',
'data-cke-pa-onclick',
'data-cke-saved-name',
'dir',
'id',
'lang',
'name',
'onclick',
'rel',
'style',
'tabindex',
'target',
'title',
'type'
'target'
] );
},

@@ -139,7 +127,7 @@
},

'test link attributes - mailto': function() {
var html = '<a href="mailto:foo?subject=bar&amp;body=bam">foo</a>';
var html = '<a href="mailto:foo?subject=bar&amp;body=bam" style="text-decoration: none;" id="some_link">foo</a>';

assertLink( this.editorBot, html,
{
@@ -148,9 +136,15 @@
address: 'foo',
subject: 'bar',
body: 'bam'
},
advanced: {
advId: 'some_link',
advStyles: 'text-decoration:none'
}
}, {
'data-cke-saved-href': 'mailto:foo?subject=bar&body=bam',
id: 'some_link',
style: 'text-decoration:none',
href: 'mailto:foo?subject=bar&body=bam'
},
[
@@ -160,12 +154,10 @@
'data-cke-pa-onclick',
'data-cke-saved-name',
'dir',
'id',
'lang',
'name',
'onclick',
'rel',
'style',
'tabindex',
'target',
'title',
@@ -174,17 +166,23 @@
},

'test link attributes - simple': function() {
var html = '<a href="http://x">foo</a>';
var html = '<a href="http://x" style="text-decoration: none;" id="some_link">foo</a>';

assertLink( this.editorBot, html,
{
type: 'url',
url: {
protocol: 'http://',
url: 'x'
},
advanced: {
advId: 'some_link',
advStyles: 'text-decoration:none'
}
}, {
'data-cke-saved-href': 'http://x',
id: 'some_link',
style: 'text-decoration:none',
href: 'http://x'
},
[
@@ -194,12 +192,10 @@
'data-cke-pa-onclick',
'data-cke-saved-name',
'dir',
'id',
'lang',
'name',
'onclick',
'rel',
'style',
'tabindex',
'target',
'title',
@@ -222,27 +218,15 @@
href: '#a'
},
[
'accessKey',
'charset',
'class',
'data-cke-pa-onclick',
'data-cke-saved-name',
'dir',
'id',
'lang',
'name',
'onclick',
'rel',
'style',
'tabindex',
'target',
'title',
'type'
'target'
] );
},

'test link attributes - target popup': function() {
var html = '<a href="http://foo" onclick="window.open(this.href, \'pop\', \'resizable=yes,status=yes,location=yes,toolbar=yes,menubar=yes,' +
var html = '<a href="http://foo" style="text-decoration: none;" id="some_link" onclick="window.open(this.href, \'pop\', \'resizable=yes,status=yes,location=yes,toolbar=yes,menubar=yes,' +
'fullscreen=yes,scrollbars=yes,dependent=yes,width=10,left=20,height=30,top=40\'); return false;">foo</a>';

assertLink( this.editorBot, html,
@@ -267,11 +251,17 @@
left: '20',
height: '30',
top: '40'
},
advanced: {
advId: 'some_link',
advStyles: 'text-decoration:none'
}
}, {
'data-cke-saved-href': 'http://foo',
'data-cke-pa-onclick': 'window.open(this.href, \'pop\', \'resizable=yes,status=yes,location=yes,toolbar=yes,menubar=yes,fullscreen=yes,' +
'scrollbars=yes,dependent=yes,width=10,left=20,height=30,top=40\'); return false;',
id: 'some_link',
style: 'text-decoration:none',
href: 'http://foo'
},
[
@@ -280,21 +270,18 @@
'class',
'data-cke-saved-name',
'dir',
'id',
'lang',
'name',
'onclick',
'rel',
'style',
'tabindex',
'target',
'title',
'type'
'title,type'
] );
},

'test link attributes - target _top': function() {
var html = '<a href="http://x" target="_top">foo</a>';
var html = '<a href="http://x" target="_top" style="text-decoration: none;" id="some_link">foo</a>';

assertLink( this.editorBot, html,
{
@@ -306,10 +293,16 @@
target: {
type: '_top',
name: '_top'
},
advanced: {
advId: 'some_link',
advStyles: 'text-decoration:none'
}
}, {
'data-cke-saved-href': 'http://x',
target: '_top',
id: 'some_link',
style: 'text-decoration:none',
href: 'http://x'
},
[
@@ -319,12 +312,10 @@
'data-cke-pa-onclick',
'data-cke-saved-name',
'dir',
'id',
'lang',
'name',
'onclick',
'rel',
'style',
'tabindex',
'title',
'type'

0 comments on commit 55a9c5b

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