Merge pull request #32243 from cogk/fix-blog-intro-strip-tags-before-truncate

fix(blog): Strip tags before truncating content for intro
This commit is contained in:
Ejaaz Khan 2025-04-22 14:50:57 +05:30 committed by GitHub
commit 0f2c81e862
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,8 +69,7 @@ class BlogPost(WebsiteGenerator):
if not self.blog_intro:
content = get_html_content_based_on_type(self, "content", self.content_type)
self.blog_intro = content[:200]
self.blog_intro = strip_html_tags(self.blog_intro)
self.blog_intro = strip_html_tags(content)[:200]
if self.blog_intro:
self.blog_intro = self.blog_intro[:200]