Skip to content

Commit

Permalink
Merge branch 'kjac-v7-fix-linkpicker-anchor-link-without-url' into v7…
Browse files Browse the repository at this point in the history
…/dev
  • Loading branch information
Shazwazza committed Jun 18, 2019
2 parents 99cabe5 + 9f6da2c commit cff5046
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ function tinyMceService($log, imageHelper, $http, $timeout, macroResource, macro
}
}

if (!href) {
if (!href && !target.anchor) {
editor.execCommand('unlink');
return;
}
Expand All @@ -850,6 +850,10 @@ function tinyMceService($log, imageHelper, $http, $timeout, macroResource, macro
return;
}

if (!href) {
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
Expand Down

0 comments on commit cff5046

Please sign in to comment.