forked from indymedia/epicyon
Replace email style quote
parent
21573b6ca7
commit
1df8451956
5
tests.py
5
tests.py
|
@ -2127,10 +2127,11 @@ def testConstantTimeStringCheck():
|
||||||
|
|
||||||
def testReplaceEmailQuote():
|
def testReplaceEmailQuote():
|
||||||
print('testReplaceEmailQuote')
|
print('testReplaceEmailQuote')
|
||||||
testStr='<p>This content has no quote.</p>'
|
testStr = '<p>This content has no quote.</p>'
|
||||||
assert htmlReplaceEmailQuote(testStr) == testStr
|
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
|
assert htmlReplaceEmailQuote(testStr) == testStr
|
||||||
|
|
||||||
testStr = "<p><span class=\"h-card\">" + \
|
testStr = "<p><span class=\"h-card\">" + \
|
||||||
|
|
|
@ -58,6 +58,7 @@ from bookmarks import bookmarkedByPerson
|
||||||
from announce import announcedByPerson
|
from announce import announcedByPerson
|
||||||
from blocking import isBlocked
|
from blocking import isBlocked
|
||||||
from blocking import isBlockedHashtag
|
from blocking import isBlockedHashtag
|
||||||
|
from content import htmlReplaceEmailQuote
|
||||||
from content import htmlReplaceQuoteMarks
|
from content import htmlReplaceQuoteMarks
|
||||||
from content import removeTextFormatting
|
from content import removeTextFormatting
|
||||||
from content import switchWords
|
from content import switchWords
|
||||||
|
@ -4761,6 +4762,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
objectContent = removeTextFormatting(objectContent)
|
objectContent = removeTextFormatting(objectContent)
|
||||||
objectContent = \
|
objectContent = \
|
||||||
switchWords(baseDir, nickname, domain, objectContent)
|
switchWords(baseDir, nickname, domain, objectContent)
|
||||||
|
objectContent = htmlReplaceEmailQuote(objectContent)
|
||||||
objectContent = htmlReplaceQuoteMarks(objectContent)
|
objectContent = htmlReplaceQuoteMarks(objectContent)
|
||||||
else:
|
else:
|
||||||
objectContent = \
|
objectContent = \
|
||||||
|
|
Loading…
Reference in New Issue