From a89ba2df354e3cc324f7c7e52b70842b8f64ab71 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 08 Jul 2022 11:28:43 +0800
Subject: [PATCH] fix

---
 src/main/java/com/xcong/farmer/cms/core/node/Template.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/xcong/farmer/cms/core/node/Template.java b/src/main/java/com/xcong/farmer/cms/core/node/Template.java
index 9e2e5b9..e1ef6e0 100644
--- a/src/main/java/com/xcong/farmer/cms/core/node/Template.java
+++ b/src/main/java/com/xcong/farmer/cms/core/node/Template.java
@@ -63,7 +63,7 @@
         if ("article".equals(templateType)) {
             Object templateName = system.get("templateName");
             if (templateName != null) {
-                this.name = (String) templateName;
+                this.name = String.valueOf(templateName);
             }
         } else if ("column".equals(templateType)) {
             Object page = system.get("page");
@@ -77,7 +77,7 @@
     }
 
     public void parser() {
-        Elements children = document.body().children();
+        Elements children = document.children();
         if (CollUtil.isNotEmpty(children)) {
             for (Element child : children) {
                 PartNode partNode = new PartNode(child, this.system);
@@ -96,7 +96,7 @@
         for (PartNode partNode : partNodes) {
             sb.append(partNode.getHtml());
         }
-        document.body().empty().html(sb.toString());
+        document = Jsoup.parse(sb.toString());
         String outPath = path(outputPath);
 
         String html = document.html();

--
Gitblit v1.9.1