mirror of https://gitlab.com/bashrc2/epicyon
Don't use raw blog content
parent
dbd9acbc9d
commit
7b1a1e8585
2
blog.py
2
blog.py
|
@ -381,8 +381,6 @@ def _getSnippetFromBlogContent(postJsonObject: {}) -> str:
|
||||||
"""Returns a snippet of text from the blog post as a preview
|
"""Returns a snippet of text from the blog post as a preview
|
||||||
"""
|
"""
|
||||||
content = postJsonObject['object']['content']
|
content = postJsonObject['object']['content']
|
||||||
if len(content) < 256:
|
|
||||||
return removeHtml(content)
|
|
||||||
if '<p>' in content:
|
if '<p>' in content:
|
||||||
content = content.split('<p>', 1)[1]
|
content = content.split('<p>', 1)[1]
|
||||||
if '</p>' in content:
|
if '</p>' in content:
|
||||||
|
|
Loading…
Reference in New Issue