diff --git a/src/utils/is.ts b/src/utils/is.ts index ca4fa9e..6c52c4c 100644 --- a/src/utils/is.ts +++ b/src/utils/is.ts @@ -101,7 +101,7 @@ export const isClient = !isServer; export function isUrl(path: string): boolean { const reg = - /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/; + /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_{\s\S}]*)#?(?:[\w]*))?)$/; return reg.test(path); }