diff --git a/posts.py b/posts.py index 9c03e89b..c9ee33da 100644 --- a/posts.py +++ b/posts.py @@ -461,6 +461,7 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \ nickname,domain,content, \ mentionedRecipients, \ hashtagsDict) + print('Content tagging stage 1: '+content) statusNumber,published = getStatusNumber() postTo='https://www.w3.org/ns/activitystreams#Public' @@ -501,7 +502,9 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \ tags.append(tag) if isPublic: updateHashtagsIndex(baseDir,tag,newPostId) + print('Content tags: '+str(tags)) content=replaceEmojiFromTags(content,tags,'content') + print('Content tagging stage 2: '+content) if not clientToServer: actorUrl=httpPrefix+'://'+domain+'/users/'+nickname diff --git a/webinterface.py b/webinterface.py index 0cef7105..88d07180 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1599,18 +1599,22 @@ def addEmojiToDisplayName(baseDir: str,httpPrefix: str, \ if ':' in displayName: displayName=displayName.replace('
','').replace('
','') emojiTags={} + print('TAG: displayName before tags: '+displayName) displayName= \ addHtmlTags(baseDir,httpPrefix, \ nickname,domain,displayName,[],emojiTags) displayName=displayName.replace('','').replace('
','') + print('TAG: displayName after tags: '+displayName) # convert the emoji dictionary to a list emojiTagsList=[] for tagName,tag in emojiTags.items(): emojiTagsList.append(tag) + print('TAG: emoji tags list: '+str(emojiTagsList)) if not inProfileName: displayName=replaceEmojiFromTags(displayName,emojiTagsList,'post header') else: displayName=replaceEmojiFromTags(displayName,emojiTagsList,'profile') + print('TAG: displayName after tag replacements: '+displayName) return displayName def individualPostAsHtml(iconsDir: str,translate: {}, \