|
@@ -56,6 +56,18 @@ func GetReportContentTextSub(content string) (contentSub string, err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+func GetReportContentTextSubNew(content string) (contentSub string, err error) {
|
|
|
+ content = html.UnescapeString(content)
|
|
|
+ doc, err := goquery.NewDocumentFromReader(strings.NewReader(content))
|
|
|
+ docText := doc.Text()
|
|
|
+ bodyRune := []rune(docText)
|
|
|
+ bodyRuneLen := len(bodyRune)
|
|
|
+ body := string(bodyRune[:bodyRuneLen])
|
|
|
+ contentSub = body
|
|
|
+ contentSub = strings.Replace(body, "Powered by Froala Editor", "", -1)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
//解析文章内容
|
|
|
func GetArticleAll() {
|
|
|
var err error
|