From 880a7c8cca398b966acebddf7eaca907b01704f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=96=B0=E5=A5=87?= Date: Mon, 26 Dec 2016 22:13:56 +0800 Subject: [PATCH] fixed issue with urls that start with // --- src/base/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/util.js b/src/base/util.js index a79c4ce0..ddc2520c 100644 --- a/src/base/util.js +++ b/src/base/util.js @@ -711,8 +711,8 @@ NEJ.define([ _reg2 = /[#\?]/, _base = location.href.split(/[?#]/)[0], _anchor = document.createElement('a'); - var _isAbsolute = function(_uri){ - return (_uri||'').indexOf('://')>0; + var _isAbsolute = function(_uri){ + return (_uri||'').indexOf('://')>0 || (_uri||'').match(/^\/\//); }; var _doFormat = function(_uri){ return (_uri||'').split(_reg2)[0]