排除//www.baidu.com 这个情况
Showing
1 changed file
with
1 additions
and
1 deletions
@@ -67,7 +67,7 @@ const common = { | @@ -67,7 +67,7 @@ const common = { | ||
67 | 67 | ||
68 | refer = decodeURI(refer); | 68 | refer = decodeURI(refer); |
69 | 69 | ||
70 | - let urlObj = url.parse(refer); | 70 | + let urlObj = url.parse(refer, false, true); |
71 | 71 | ||
72 | if (urlObj.hostname && !/yohobuy\.com$/.test(urlObj.hostname)) { | 72 | if (urlObj.hostname && !/yohobuy\.com$/.test(urlObj.hostname)) { |
73 | refer = '/'; | 73 | refer = '/'; |
-
Please register or login to post a comment