diff --git a/jvue-front/pages/post/_id.vue b/jvue-front/pages/post/_id.vue
index 4a8db4b..45f5771 100644
--- a/jvue-front/pages/post/_id.vue
+++ b/jvue-front/pages/post/_id.vue
@@ -43,6 +43,18 @@
+
+
+
+ {{ tagItem.tag }}
+
+
+
+
{
+ const randomColor = colors[Math.floor(Math.random() * colors.length)];
+
+ tagArr.push({
+ tag: item,
+ color: randomColor
+ });
+ });
+ }
+
+ Object.assign(postObj, {
+ tagArray: tagArr
+ });
+
logger.info("fetch siteConfig and post finish");
return { siteConfigObj, postObj, errorMessage };
@@ -216,6 +247,11 @@ export default {
}
}
+.post-default .post-tag {
+ margin-right: 10px;
+ cursor: pointer;
+}
+
.post-default #postContent {
h1 {
font-size: 28px;
diff --git a/jvue-server/src/main/java/com/terwergreen/jvueserver/util/HtmlUtil.java b/jvue-server/src/main/java/com/terwergreen/jvueserver/util/HtmlUtil.java
index 7f39a45..89826cf 100644
--- a/jvue-server/src/main/java/com/terwergreen/jvueserver/util/HtmlUtil.java
+++ b/jvue-server/src/main/java/com/terwergreen/jvueserver/util/HtmlUtil.java
@@ -14,17 +14,17 @@ private static String parseHtml(String html) {
* "<.*?"表示<尖括号后的所有字符,此方法可以去掉残缺的标签,及后面的内容
* " ",若有多种此种字符,可用同一方法去除
*/
+ html = html.replaceAll("", "");
+ html = html.replaceAll("", "");
+ html = html.replaceAll("", "");
+ html = html.replaceAll("", "");
+
html = html.replaceAll("<.*?>", "");
html = html.replaceAll("<.*?", "");
html = html.replaceAll("\\n", "");
html = html.replaceAll(""", "");
html = html.replaceAll(" ", "");
- html = html.replaceAll("", "");
- html = html.replaceAll("", "");
- html = html.replaceAll("", "");
- html = html.replaceAll("", "");
-
return (html);
}