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.
This commit is contained in:
perter lee 2019-09-19 15:52:52 +08:00 committed by GitHub
parent f1b6594c50
commit cfd870f525
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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