Support protocol-relative URLs in the interstice

This commit is contained in:
Guangcong Luo 2015-12-31 00:31:21 -05:00
parent 74ef3fd560
commit 3eb3451213

View File

@ -722,7 +722,7 @@ var Tools = {
var patterns = (function (whitelist) {
var patterns = [];
for (var i = 0; i < whitelist.length; ++i) {
patterns.push(new RegExp('https?://([A-Za-z0-9-]*\\.)?' +
patterns.push(new RegExp('^(https?:)?//([A-Za-z0-9-]*\\.)?' +
whitelist[i] +
'(/.*)?', 'i'));
}