Przeglądaj źródła

Update DocumentModel.go

some version go strings libiary not define the ReplaceAll function,so if someone use that to  build from source code cause the compiler error, but the replace function is define all version.
perter lee 6 lat temu
rodzic
commit
cfd870f525
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      models/DocumentModel.go

+ 1 - 1
models/DocumentModel.go

@@ -355,7 +355,7 @@ func (item *Document) Processor() *Document {
 						selection.SetAttr("href", "#")
 						return
 					}
-					val = strings.ReplaceAll(strings.ToLower(val), " ", "")
+					val = strings.Replace(strings.ToLower(val), " ", "",-1)
 					//移除危险脚本链接
 					if strings.HasPrefix(val, "data:text/html") ||
 						strings.HasPrefix(val, "vbscript:") ||