From cfd870f52574d6dd1472a11a7a8b5d3dd978286a Mon Sep 17 00:00:00 2001 From: perter lee Date: Thu, 19 Sep 2019 15:52:52 +0800 Subject: [PATCH] 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. --- models/DocumentModel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/DocumentModel.go b/models/DocumentModel.go index d8f33ce0..24eece15 100644 --- a/models/DocumentModel.go +++ b/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:") ||