Replace email style quote

main
Bob Mottram 2020-09-14 10:41:44 +01:00
parent 21573b6ca7
commit 1df8451956
2 changed files with 5 additions and 2 deletions

View File

@ -2127,10 +2127,11 @@ def testConstantTimeStringCheck():
def testReplaceEmailQuote():
print('testReplaceEmailQuote')
testStr='<p>This content has no quote.</p>'
testStr = '<p>This content has no quote.</p>'
assert htmlReplaceEmailQuote(testStr) == testStr
testStr='<p>This content has no quote.\nWith multiple\nlines</p>'
testStr = '<p>This content has no quote.</p>' + \
'<p>With multiple</p><p>lines</p>'
assert htmlReplaceEmailQuote(testStr) == testStr
testStr = "<p><span class=\"h-card\">" + \

View File

@ -58,6 +58,7 @@ from bookmarks import bookmarkedByPerson
from announce import announcedByPerson
from blocking import isBlocked
from blocking import isBlockedHashtag
from content import htmlReplaceEmailQuote
from content import htmlReplaceQuoteMarks
from content import removeTextFormatting
from content import switchWords
@ -4761,6 +4762,7 @@ def individualPostAsHtml(allowDownloads: bool,
objectContent = removeTextFormatting(objectContent)
objectContent = \
switchWords(baseDir, nickname, domain, objectContent)
objectContent = htmlReplaceEmailQuote(objectContent)
objectContent = htmlReplaceQuoteMarks(objectContent)
else:
objectContent = \