RTE: Don't assume "mailto:" protocol in links with "@"
This commit is contained in:
committed by
Sebastiaan Janssen
parent
b367ae6c80
commit
21e91ac4e1
@@ -850,9 +850,10 @@ function tinyMceService($log, imageHelper, $http, $timeout, macroResource, macro
|
||||
return;
|
||||
}
|
||||
|
||||
// Is email and not //user@domain.com
|
||||
if (href.indexOf('@') > 0 && href.indexOf('//') === -1 && href.indexOf('mailto:') === -1) {
|
||||
href = 'mailto:' + href;
|
||||
// Is email and not //user@domain.com and protocol (e.g. mailto:, sip:) is not specified
|
||||
if (href.indexOf('@') > 0 && href.indexOf('//') === -1 && href.indexOf(':') === -1) {
|
||||
// assume it's a mailto link
|
||||
href = 'mailto:' + href;
|
||||
insertLink();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user