maxiaoshan 3 vuotta sitten
vanhempi
commit
c90d342fcf
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      src/spider/script.go

+ 1 - 1
src/spider/script.go

@@ -735,7 +735,7 @@ func (s *Script) LoadScript(code, script_file string, newstate bool) string {
 	//去除特殊标签中间内容
 	s.L.SetGlobal("getPureContent", s.L.NewFunction(func(S *lua.LState) int {
 		con := S.ToString(-1)
-		reg := regexp.MustCompile("(?s)<!%-%-.*?%-%->")
+		reg := regexp.MustCompile("(?s)<(!%-%-|!--|style).*?(%-%-|--|style)>") //注释 css
 		con = reg.ReplaceAllString(con, "")
 		// indexArr := reg.FindAllStringIndex(con, -1)
 		// for i := len(indexArr) - 1; i >= 0; i-- {