Przeglądaj źródła

过滤文章编辑器自带的垃圾格式

xingzai 2 lat temu
rodzic
commit
b6312e0ba7
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      services/article.go

+ 1 - 0
services/article.go

@@ -70,6 +70,7 @@ func GetReportContentTextSubNew(content string) (contentSub string, err error) {
 	contentSub = body
 	contentSub = strings.Replace(body, "Powered by Froala Editor", "", -1)
 	contentSub = strings.Replace(body, " ", "", -1)
+	contentSub = strings.Replace(body, "<p data-f-id=\"pbf\" style=\"text-align: center; font-size: 14px; margin-top: 30px; opacity: 0.65; font-family: sans-serif;\">Powered by <a href=\"https://www.froala.com/wysiwyg-editor?pb=1\" title=\"Froala Editor\">Froala Editor</a></p>", "", -1)
 	return
 }