Completely ignore remote links
There are no issues with "returning true" so this should be the preferred way. No need to fall back on "window.open" here. fixes #6159
This commit is contained in:
parent
e70ca26427
commit
23679c0078
|
@ -420,8 +420,13 @@
|
|||
var formerUrl;
|
||||
var remote = /^(?:[a-z]+:)\/\//;
|
||||
|
||||
// Let remote links pass through
|
||||
if (href.match(remote)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// window.open is used as return true; didn't work reliable
|
||||
if (linkTarget === '_blank' || linkTarget === '_self' || href.match(remote)) {
|
||||
if (linkTarget === '_blank' || linkTarget === '_self') {
|
||||
window.open(href, linkTarget);
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue