diff --git a/webinterface.py b/webinterface.py
index cb74c0ef..32d77880 100644
--- a/webinterface.py
+++ b/webinterface.py
@@ -73,6 +73,16 @@ from git import isGitPatch
from theme import getThemesList
+def getContentWarningButton(postID: str, translate: {},
+ content: str) -> str:
+ """Returns the markup for a content warning button
+ """
+ return '' + \
+ '
' + \
+ content + '
'
+
+
def getBlogAddress(actorJson: {}) -> str:
"""Returns blog address for the given actor
"""
@@ -4095,17 +4105,15 @@ def individualPostAsHtml(recentPostsCache: {}, maxRecentPosts: int,
'' + postJsonObject['object']['summary'] + ' '
if isModerationPost:
containerClass = 'container report'
- contentStr += \
- ''
- contentStr += ''
- contentStr += objectContent + attachmentStr
+ # get the content warning text
+ cwContentStr = objectContent + attachmentStr
if not isPatch:
- contentStr = addEmbeddedElements(translate, contentStr)
- contentStr = \
+ cwContentStr = addEmbeddedElements(translate, cwContentStr)
+ cwContentStr = \
insertQuestion(baseDir, translate, nickname, domain, port,
- contentStr, postJsonObject, pageNumber)
- contentStr += '
'
+ cwContentStr, postJsonObject, pageNumber)
+ # get the content warning button
+ contentStr += getContentWarningButton(postID, translate, cwContentStr)
if postJsonObject['object'].get('tag') and not isPatch:
contentStr = \