diff --git a/webapp_post.py b/webapp_post.py
index 329d11f3..93d0e8b5 100644
--- a/webapp_post.py
+++ b/webapp_post.py
@@ -692,6 +692,22 @@ def announceWithoutDisplayNameHtml(translate: {}, iconsPath: str,
announceNickname + '@' + announceDomain + '\n'
+def announceWithDisplayNameHtml(translate: {},
+ iconsPath: str,
+ postJsonObject: {},
+ announceDisplayName: str) -> str:
+ """Returns html for an announce having a display name
+ """
+ return ' \n' + \
+ ' ' + announceDisplayName + '\n'
+
+
def getPostTitleAnnounceHtml(baseDir: str,
httpPrefix: str,
nickname: str, domain: str,
@@ -767,16 +783,10 @@ def getPostTitleAnnounceHtml(baseDir: str,
' 13.3.1 = ' + str(timeDiff))
titleStr += \
- ' ' + \
- '\n' + \
- ' ' + \
- announceDisplayName + '\n'
+ announceWithDisplayNameHtml(translate,
+ iconsPath,
+ postJsonObject,
+ announceDisplayName)
# show avatar of person replied to
announceActor = \
postJsonObject['object']['attributedTo']