Browse Source

fix: signin url (#5800)

zxhlyh 9 months ago
parent
commit
5692f9b33b
1 changed files with 3 additions and 1 deletions
  1. 3 1
      web/utils/index.ts

+ 3 - 1
web/utils/index.ts

@@ -1,3 +1,5 @@
+import { escape } from 'lodash-es'
+
 export const sleep = (ms: number) => {
   return new Promise(resolve => setTimeout(resolve, ms))
 }
@@ -35,5 +37,5 @@ export const getPurifyHref = (href: string) => {
   if (!href)
     return ''
 
-  return href.replace(/javascript:/ig, '').replace(/vbscript:/ig, '').replace(/data:/ig, '')
+  return escape(href)
 }