From 0ce1c6eb6e5707ccfb47113b2c58c9961f2eae48 Mon Sep 17 00:00:00 2001
From: Lan Hui <1348141770@qq.com>
Date: Sun, 26 Mar 2023 21:14:29 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=87=E7=AB=A0=E7=AE=A1=E7=90=86=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=EF=BC=9A=E6=AF=8F=E7=AF=87=E6=96=87=E7=AB=A0=E4=B8=AD?=
=?UTF-8?q?=E4=BF=9D=E7=95=99=E6=8D=A2=E8=A1=8C=EF=BC=8C=E6=96=B9=E4=BE=BF?=
=?UTF-8?q?=E6=9F=A5=E7=9C=8B=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/admin_service.py | 2 +-
app/templates/admin_manage_article.html | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/admin_service.py b/app/admin_service.py
index 1899002..16e80db 100644
--- a/app/admin_service.py
+++ b/app/admin_service.py
@@ -57,7 +57,7 @@ def article():
_articles = get_page_articles(_cur_page, _page_size)
for article in _articles: # 获取每篇文章的title
article.title = article.text.split("\n")[0]
- article.content = ''.join(article.text.split("\n")[1:])
+ article.content = '
'.join(article.text.split("\n")[1:])
context = {
"article_number": _article_number,
diff --git a/app/templates/admin_manage_article.html b/app/templates/admin_manage_article.html
index 1a07133..272b54e 100644
--- a/app/templates/admin_manage_article.html
+++ b/app/templates/admin_manage_article.html
@@ -77,7 +77,7 @@
Level: {{text.level }}
Date: {{ text.date }}
-
{{ text.content }}
+ {{ text.content | safe }} {% endfor %}