Merge pull request #536 from liyang1009/patch-1

fix ReplaceAll function not defined error
pull/616/head
Minho 2019-09-19 17:44:47 +08:00 committed by GitHub
commit b7d8de8e93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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:") ||