Opened 5 years ago

Closed 17 months ago

#9192 closed Bug (fixed)

Link Plugin and emailProtection='encode' problem

Reported by: standus Owned by: t.jakut
Priority: Normal Milestone: CKEditor 4.5.5
Component: General Version: 3.1
Keywords: Cc:

Description

When I config CKEditor for emailProtection = 'encode' and try edit already encoded email address, Link Plugin Dialog parse email with postfix 'undefined' like this: test@…

Attachments (5)

1.jpg (40.4 KB) - added by standus 4 years ago.
2.jpg (39.7 KB) - added by standus 4 years ago.
3.jpg (43.4 KB) - added by standus 4 years ago.
4.jpg (40.7 KB) - added by standus 4 years ago.
i.jpg (42.7 KB) - added by standus 4 years ago.

Download all attachments as: .zip

Change History (20)

comment:1 Changed 5 years ago by j.swiderski

  • Keywords link email removed
  • Status changed from new to pending
  • Version 3.6.5 (SVN - trunk) deleted

and try edit already encoded email address

  • I have set config.emailProtection = 'encode';
  • Inserted email
  • Edited it again and didn't have a problem.

Where exactly are you getting this issue - isn't this after you save your data into DB and then bring it up again? If that is the case then you should focus on encoding conflicts in your application, server, or DB.
Another thing might be for example double encoding or using wrong method to do that.

Is this the problem you are getting? Could you describe in more detail?

comment:2 Changed 5 years ago by standus

Its happen only if I no fill email description. When I fill description it is ok.

comment:3 Changed 5 years ago by j.swiderski

I assume that by description you mean Message Body. Is that correct?

With or without message Body I was not able to reproduce the problem.

Could you please provide step by step scenario explaining how to reproduce this problem?
If possible please provide screen cast (jing if good for these things).

Changed 4 years ago by standus

Changed 4 years ago by standus

Changed 4 years ago by standus

Changed 4 years ago by standus

Changed 4 years ago by standus

comment:4 Changed 4 years ago by standus

Description means Message Title, but I tested no body content and it is same. And I found problem. Problem is Google Chrome, because in FF it is OK.

comment:5 Changed 4 years ago by j.swiderski

  • Status changed from pending to confirmed
  • Version set to 3.1

@standus thank you now it's clear.

To reproduce:

  1. set config.emailProtection = 'encode';
  2. Open editor sample
  3. Open link dialog and chooe Email
  4. Fill in only address files E.g. test@test.com
  5. Click OK and then double-click on link to open dialog (or click and use toolbar button)

Result:
Address field will be test@test.comundefined

Problem has been reproducible from CKEditor 3.1 in Webkit, IE and Opera.
Firefox is the only browser that actually works with this TC.

comment:6 Changed 3 years ago by j.swiderski

#11919 was marked as duplicate.

comment:7 Changed 2 years ago by standus

What about this bug?

comment:9 Changed 2 years ago by standus

Not solved to last public version. Now 4.4.6! Ohhhh! Tested with Chrome 39.

Last edited 2 years ago by standus (previous) (diff)

comment:10 Changed 2 years ago by j.swiderski

#13022 was marked as duplicate.

comment:11 Changed 18 months ago by Gabriela

I've corrected it in my version, which is CKEditor 3.6.6.

The bug is in file plugins/link/dialogs/link.js. This file is minified, so I took the unminified file from _source/plugins/link/dialogs/link.js.

In unminified file around line 112 there is a function which looks like that:

function ( match, protectedAddress, rest )
{
    if (typeof rest === 'undefined'){
        rest = '';
    }
    return 'mailto:' +
        String.fromCharCode.apply( String, protectedAddress.split( ',' ) ) + 
        ( rest && unescapeSingleQuote( rest ) );
});

and the usage of undefined rest variable causes the erroneous concatenated string. I've added line which checks out the state of the rest variable before return.

if (typeof rest === 'undefined'){
    rest = '';
}
Last edited 18 months ago by Gabriela (previous) (diff)

comment:12 Changed 17 months ago by m.lewandowski

  • Milestone set to CKEditor 4.5.5

comment:13 Changed 17 months ago by t.jakut

  • Owner set to t.jakut
  • Status changed from confirmed to assigned

comment:14 Changed 17 months ago by t.jakut

  • Status changed from assigned to review

Pushed fix with tests to branch:t/9192.

comment:15 Changed 17 months ago by m.lewandowski

Great! Merged to master with git:cda09c7.

comment:16 Changed 17 months ago by m.lewandowski

  • Resolution set to fixed
  • Status changed from review to closed
Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy