Explorar o código

Merge pull request #536 from liyang1009/patch-1

fix ReplaceAll function not defined error
Minho %!s(int64=6) %!d(string=hai) anos
pai
achega
b7d8de8e93
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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:") ||