Detect and handle remote links
Currently they trigger XHR requests if not given a special target. fixes #6159
This commit is contained in:
parent
c93564c797
commit
e70ca26427
|
@ -418,11 +418,10 @@
|
|||
var $target;
|
||||
var isMenuLink = $a.closest('#menu').length > 0;
|
||||
var formerUrl;
|
||||
var remote = /^(?:[a-z]+:)\/\//;
|
||||
|
||||
// TODO: Let remote links pass through. Right now they only work
|
||||
// combined with target="_blank" or target="_self"
|
||||
// window.open is used as return true; didn't work reliable
|
||||
if (linkTarget === '_blank' || linkTarget === '_self') {
|
||||
if (linkTarget === '_blank' || linkTarget === '_self' || href.match(remote)) {
|
||||
window.open(href, linkTarget);
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue