package plugins import ( "fmt" "github.com/gin-gonic/gin" "github/fthvgb1/wp-go/helper" "github/fthvgb1/wp-go/models" "regexp" "strings" "unicode/utf8" ) var removeWpBlock = regexp.MustCompile("") var more = regexp.MustCompile("") var tag = regexp.MustCompile(`<.*?>`) var limit = 300 func ExceptRaw(str string, limit, id int) string { if r := more.FindString(str); r != "" { m := strings.Split(str, r) str = m[0] return "" } content := removeWpBlock.ReplaceAllString(str, "") content = strings.Trim(content, " \t\n\r\000\x0B") content = strings.Replace(content, "]]>", "]]>", -1) content = helper.StripTagsX(content, "