From 1df84519567600174f0adc45eb31ddf6a99b8ee8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 14 Sep 2020 10:41:44 +0100 Subject: [PATCH] Replace email style quote --- tests.py | 5 +++-- webinterface.py | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests.py b/tests.py index ecb58134..110c99be 100644 --- a/tests.py +++ b/tests.py @@ -2127,10 +2127,11 @@ def testConstantTimeStringCheck(): def testReplaceEmailQuote(): print('testReplaceEmailQuote') - testStr='

This content has no quote.

' + testStr = '

This content has no quote.

' assert htmlReplaceEmailQuote(testStr) == testStr - testStr='

This content has no quote.\nWith multiple\nlines

' + testStr = '

This content has no quote.

' + \ + '

With multiple

lines

' assert htmlReplaceEmailQuote(testStr) == testStr testStr = "

" + \ diff --git a/webinterface.py b/webinterface.py index ea866893..30907a2d 100644 --- a/webinterface.py +++ b/webinterface.py @@ -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 = \