Opened 12 years ago
Closed 9 years ago
#9192 closed Bug (fixed)
Link Plugin and emailProtection='encode' problem
Reported by: | Stan | Owned by: | Tomasz 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)
Change History (20)
comment:1 Changed 12 years ago by
Keywords: | link email removed |
---|---|
Status: | new → pending |
Version: | 3.6.5 (SVN - trunk) |
comment:2 Changed 12 years ago by
Its happen only if I no fill email description. When I fill description it is ok.
comment:3 Changed 12 years ago by
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 12 years ago by
Changed 12 years ago by
Changed 12 years ago by
Changed 12 years ago by
Changed 12 years ago by
comment:4 Changed 12 years ago by
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 12 years ago by
Status: | pending → confirmed |
---|---|
Version: | → 3.1 |
@standus thank you now it's clear.
To reproduce:
- set
config.emailProtection = 'encode';
- Open editor sample
- Open link dialog and chooe Email
- Fill in only address files E.g.
test@test.com
- 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:9 Changed 10 years ago by
Not solved to last public version. Now 4.4.6! Ohhhh! Tested with Chrome 39.
comment:11 Changed 9 years ago by
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 = ''; }
comment:12 Changed 9 years ago by
Milestone: | → CKEditor 4.5.5 |
---|
comment:13 Changed 9 years ago by
Owner: | set to Tomasz Jakut |
---|---|
Status: | confirmed → assigned |
comment:14 Changed 9 years ago by
Status: | assigned → review |
---|
Pushed fix with tests to branch:t/9192.
comment:16 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | review → closed |
config.emailProtection = 'encode';
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?