This commit is contained in:
psychobunny
2017-03-10 14:03:07 -05:00
parent 5aa45e9181
commit f2eb4b8083
4 changed files with 18 additions and 3 deletions

View File

@@ -366,8 +366,13 @@ $(document).ready(function () {
window.open(this.href, '_blank');
e.preventDefault();
} else if (config.useOutgoingLinksPage) {
ajaxify.go('outgoing?url=' + encodeURIComponent(this.href));
e.preventDefault();
var safeUrls = config.outgoingLinksWhitelist.trim().split(/[\s,]+/g);
var href = this.href;
if (!safeUrls.some(function(url) { return href.indexOf(url) !== -1; } )) {
ajaxify.go('outgoing?url=' + encodeURIComponent(href));
e.preventDefault();
}
}
}
}