Skip to content
Permalink
Browse files

Merge branch 't/12189'

  • Loading branch information...
mlewand committed Nov 4, 2015
2 parents 9d2e4f9 + d8c97dc commit 01babe2349c28151bb25e508b3fdaafbc356825c
@@ -12,6 +12,7 @@ Fixed Issues:
* [#13887](https://dev.ckeditor.com/ticket/13887): Fixed: Link target now supports wider ASCII character range. Thanks to [SamZiemer](https://github.com/SamZiemer)!
* [#13790](https://dev.ckeditor.com/ticket/13790): Fixed: Allow for the iframe having been removed already. Thanks to [Stefan Rijnhart](https://github.com/StefanRijnhart)!
* [#13803](https://dev.ckeditor.com/ticket/13803): Fixed: Allow the editor to be destroyed before being fully initialized. Thanks to [Cyril Fluck](https://github.com/cyril-sf)!
* [#12189](http://dev.ckeditor.com/ticket/12189): Fixed: Link plugin dialog does not display subject of email links if subject parameter is not lowercase.
* [#13361](http://dev.ckeditor.com/ticket/13361): Fixed: Images fail when site path includes parentheses because background-image path needs single-quotes around URL value.
* [#13798](http://dev.ckeditor.com/ticket/13798): Fixed: Changing paragraph format causes cursor to move on Firefox 41.
* [#13771](http://dev.ckeditor.com/ticket/13771): Fixed: Now `contents.css` style will be used even if [IFrame Editing Area](http://ckeditor.com/addon/wysiwygarea) plugin is missing.
@@ -203,8 +203,8 @@
// Loads the parameters in a selected link to the link dialog fields.
var javascriptProtocolRegex = /^javascript:/,
emailRegex = /^mailto:([^?]+)(?:\?(.+))?$/,
emailSubjectRegex = /subject=([^;?:@&=$,\/]*)/,
emailBodyRegex = /body=([^;?:@&=$,\/]*)/,
emailSubjectRegex = /subject=([^;?:@&=$,\/]*)/i,
emailBodyRegex = /body=([^;?:@&=$,\/]*)/i,
anchorRegex = /^#(.*)$/,
urlRegex = /^((?:http|https|ftp|news):\/\/)?(.*)$/,
selectableTargets = /^(_(?:self|top|parent|blank))$/,
@@ -72,6 +72,28 @@ bender.test( {
assert.areEqual( '', subjectField.getValue() );
assert.areEqual( '', bodyField.getValue() );

dialog.fire( 'ok' );
dialog.hide();
} );
},

// #12189
'test read from mail link with Subject and Body parameters provided': function() {
var bot = this.editorBot;

bot.setHtmlWithSelection( '[<a href="mailto:job@cksource.com?Subject=Test%20subject&amp;Body=Test%20body">AJD</a>]' );

bot.dialog( 'link', function( dialog ) {
var linkTypeField = dialog.getContentElement( 'info', 'linkType' ),
addressField = dialog.getContentElement( 'info', 'emailAddress' ),
subjectField = dialog.getContentElement( 'info', 'emailSubject' ),
bodyField = dialog.getContentElement( 'info', 'emailBody' );

assert.areEqual( 'email', linkTypeField.getValue() );
assert.areEqual( 'job@cksource.com', addressField.getValue() );
assert.areEqual( 'Test subject', subjectField.getValue() );
assert.areEqual( 'Test body', bodyField.getValue() );

dialog.fire( 'ok' );
dialog.hide();
} );
@@ -0,0 +1,11 @@
<body>
<div id="editor">
<p>
<a href="mailto:jobs@cksource.com?Subject=Test%20subject&amp;Body=Test%20body">jobs@cksource.com</a>
</p>
</div>

<script>
CKEDITOR.replace( 'editor' );
</script>
</body>
@@ -0,0 +1,11 @@
@bender-tags: tc, link, 12189, 4.5.5
@bender-ui: collapsed
@bender-ckeditor-plugins: link, toolbar, wysiwygarea

----

1. Double click on mail link in the editor. The dialog should open.

**Expected:**
* The value of "E-mail subject" field should be equal to `Test subject`.
* The value of "Email body" field should be equal to `Test body`.

0 comments on commit 01babe2

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