Only do quotes substitution with html

merge-requests/8/head
Bob Mottram 2020-08-02 18:27:56 +01:00
parent 5efc685220
commit 1ba6861e88
2 changed files with 5 additions and 2 deletions

View File

@ -639,7 +639,7 @@ def addHtmlTags(baseDir: str, httpPrefix: str,
if longWordsList:
content = removeLongWords(content, maxWordLength, longWordsList)
content = content.replace(' --linebreak-- ', '</p><p>')
return '<p>' + htmlReplaceQuoteMarks(content) + '</p>'
return '<p>' + content + '</p>'
def getMentionsFromHtml(htmlText: str,

View File

@ -57,6 +57,7 @@ from bookmarks import bookmarkedByPerson
from announce import announcedByPerson
from blocking import isBlocked
from blocking import isBlockedHashtag
from content import htmlReplaceQuoteMarks
from content import removeTextFormatting
from content import switchWords
from content import getMentionsFromHtml
@ -4260,8 +4261,10 @@ def individualPostAsHtml(recentPostsCache: {}, maxRecentPosts: int,
objectContent = removeTextFormatting(objectContent)
objectContent = \
switchWords(baseDir, nickname, domain, objectContent)
objectContent = htmlReplaceQuoteMarks(objectContent)
else:
objectContent = postJsonObject['object']['content']
objectContent = \
htmlReplaceQuoteMarks(postJsonObject['object']['content'])
if not postIsSensitive:
contentStr = objectContent + attachmentStr