From d39169d41038ed62d1f6a9b25513b247a1a8c02f Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 30 Aug 2022 16:48:57 +0800
Subject: [PATCH] fix

---
 src/main/java/com/xcong/farmer/cms/core/node/AttrNode.java |   32 +-------------------------------
 1 files changed, 1 insertions(+), 31 deletions(-)

diff --git a/src/main/java/com/xcong/farmer/cms/core/node/AttrNode.java b/src/main/java/com/xcong/farmer/cms/core/node/AttrNode.java
index f8df3cc..8748eef 100644
--- a/src/main/java/com/xcong/farmer/cms/core/node/AttrNode.java
+++ b/src/main/java/com/xcong/farmer/cms/core/node/AttrNode.java
@@ -80,32 +80,7 @@
         return false;
     }
 
-    public void staticPath() {
-        // 设置img的链接访问
-        if ("img".equals(this.element.tagName())) {
-            String src = this.element.attr("src");
-            if (StrUtil.isNotBlank(STATIC_URL)) {
-                this.element.attr("src", STATIC_URL + src);
-            }
-        }
-
-        if ("link".equals(this.element.tagName())) {
-            String src = this.element.attr("href");
-            if (StrUtil.isNotBlank(STATIC_URL)) {
-                this.element.attr("href", STATIC_URL + src);
-            }
-        }
-
-        if ("script".equals(this.element.tagName())) {
-            String src = this.element.attr("src");
-            if (StrUtil.isNotBlank(STATIC_URL)) {
-                this.element.attr("src", STATIC_URL + src);
-            }
-        }
-    }
-
     public void parser() {
-        staticPath();
         // 判断是否为最小节点,如果是且没有特殊标签,则跳过清空
         if (!isNeedEmpty()) {
             return;
@@ -131,7 +106,6 @@
             i++;
 
             try {
-                Template.TAGS.add(tagsEnum.getName());
                 // {id=${col.id}, page=1, limit=5, field=art} ${col.id} 形式需先设置值
                 String tagValue = attributes.get(tagsEnum.getName());
                 tagValue = attrValueFormat(tagValue);
@@ -160,10 +134,6 @@
     public void runDataInject() {
         Attributes attributes = this.element.attributes();
         for (Attribute attribute : attributes) {
-            if (attribute.getKey().startsWith("\\$")) {
-                Template.TAGS.add(attribute.getKey());
-            }
-
             String key = attribute.getKey().replaceAll("\\$", "");
             String value = attribute.getValue();
 
@@ -191,7 +161,7 @@
                     this.element.html(result);
                 } else if ("time".equals(key)) {
                     TimeTag time = parserTag(result, TimeTag.class);
-                    String timeStr = DateUtil.format(DateUtil.parse(time.getText(), DatePattern.NORM_DATETIME_PATTERN), time.getFormat());
+                    String timeStr = DateUtil.format(DateUtil.parse(time.getDate(), DatePattern.NORM_DATETIME_PATTERN), time.getFormat());
                     this.element.text(timeStr);
                 } else {
                     this.element.attr(key, result);

--
Gitblit v1.9.1