From afa62a72d5f6677ae88b8dc8a0fde4820124f3bf Mon Sep 17 00:00:00 2001 From: Bobby Date: Wed, 1 Feb 2023 22:07:05 -0500 Subject: Return text only in paragraph excerpt --- blog/context_processors.py | 1 + 1 file changed, 1 insertion(+) diff --git a/blog/context_processors.py b/blog/context_processors.py index 5b3dfc4a..895bdb7c 100644 --- a/blog/context_processors.py +++ b/blog/context_processors.py @@ -14,6 +14,7 @@ def add_excerpt(post): # Create excerpt, count min 1000 characters and max upto next paragraph excerpt = '' for paragraph in soup.find_all('p'): + paragraph = '

' + str(paragraph.text) + '

' excerpt += str(paragraph) if len(excerpt) >= 1000: -- cgit v1.2.3