diff --git a/src/utils/utils.js b/src/utils/utils.js index 9700b31e98a2347b4bead287995edfe1bfe238d1..5385e42f70a000035ac4c9912395f8870835cb27 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -162,7 +162,7 @@ export function getRoutes(path, routerData) { } /* eslint no-useless-escape:0 */ -const reg = /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/g; +const reg = /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/; export function isUrl(path) { return reg.test(path);