Don't show ciphertext in the web interface

merge-requests/21/head
Bob Mottram 2021-03-12 12:17:44 +00:00
parent 3b5dba87c3
commit 77818c99ce
17 changed files with 46 additions and 26 deletions

View File

@ -400,5 +400,6 @@
"heart": "قلب",
"counselor": "مستشار",
"Counselors": "المستشارين",
"shocked": "صدمت"
"shocked": "صدمت",
"Encrypted": "مشفر"
}

View File

@ -400,5 +400,6 @@
"heart": "cor",
"counselor": "conseller",
"Counselors": "Consellers",
"shocked": "sorprès"
"shocked": "sorprès",
"Encrypted": "Xifrat"
}

View File

@ -400,5 +400,6 @@
"heart": "galon",
"counselor": "cynghorydd",
"Counselors": "Cynghorwyr",
"shocked": "sioc"
"shocked": "sioc",
"Encrypted": "Amgryptio"
}

View File

@ -400,5 +400,6 @@
"heart": "herz",
"counselor": "Beraterin",
"Counselors": "Berater",
"shocked": "schockiert"
"shocked": "schockiert",
"Encrypted": "Verschlüsselt"
}

View File

@ -400,5 +400,6 @@
"heart": "heart",
"counselor": "counselor",
"Counselors": "Counselors",
"shocked": "shocked"
"shocked": "shocked",
"Encrypted": "Encrypted"
}

View File

@ -400,5 +400,6 @@
"heart": "corazón",
"counselor": "Consejera",
"Counselors": "Consejeras",
"shocked": "conmocionada"
"shocked": "conmocionada",
"Encrypted": "Cifrada"
}

View File

@ -400,5 +400,6 @@
"heart": "cœur",
"counselor": "Conseillère",
"Counselors": "Conseillères",
"shocked": "sous le choc"
"shocked": "sous le choc",
"Encrypted": "Crypté"
}

View File

@ -400,5 +400,6 @@
"heart": "chroí",
"counselor": "Comhairleoir",
"Counselors": "Comhairleoirí",
"shocked": "ionadh"
"shocked": "ionadh",
"Encrypted": "Criptithe"
}

View File

@ -400,5 +400,6 @@
"heart": "दिल",
"counselor": "काउंसलर",
"Counselors": "सलाहकार",
"shocked": "हैरान"
"shocked": "हैरान",
"Encrypted": "को गोपित"
}

View File

@ -400,5 +400,6 @@
"heart": "cuore",
"counselor": "Consulente",
"Counselors": "Consiglieri",
"shocked": "scioccata"
"shocked": "scioccata",
"Encrypted": "Crittografato"
}

View File

@ -400,5 +400,6 @@
"heart": "ハート",
"counselor": "カウンセラー",
"Counselors": "カウンセラー",
"shocked": "ショックを受けた"
"shocked": "ショックを受けた",
"Encrypted": "暗号化"
}

View File

@ -400,5 +400,6 @@
"heart": "dil",
"counselor": "Pêşnîyarvan",
"Counselors": "Selêwirmendan",
"shocked": "şok kirin"
"shocked": "şok kirin",
"Encrypted": "Encîfre kirin"
}

View File

@ -396,5 +396,6 @@
"heart": "heart",
"counselor": "Counselors",
"Counselors": "Counselors",
"shocked": "shocked"
"shocked": "shocked",
"Encrypted": "Encrypted"
}

View File

@ -400,5 +400,6 @@
"heart": "coração",
"counselor": "Conselheira",
"Counselors": "Conselheiras",
"shocked": "chocada"
"shocked": "chocada",
"Encrypted": "Criptografada"
}

View File

@ -400,5 +400,6 @@
"heart": "сердце",
"counselor": "Советник",
"Counselors": "Советники",
"shocked": "потрясенный"
"shocked": "потрясенный",
"Encrypted": "Зашифрованный"
}

View File

@ -400,5 +400,6 @@
"heart": "心",
"counselor": "顾问",
"Counselors": "辅导员",
"shocked": "震惊的"
"shocked": "震惊的",
"Encrypted": "加密的"
}

View File

@ -21,6 +21,7 @@ from posts import postIsMuted
from posts import getPersonBox
from posts import downloadAnnounce
from posts import populateRepliesJson
from utils import isPGPEncrypted
from utils import isDM
from utils import rejectPostId
from utils import isRecentPost
@ -1570,17 +1571,20 @@ def individualPostAsHtml(allowDownloads: bool,
_logPostTiming(enableTimingLog, postStartTime, '16')
if not isPatch:
objectContent = \
removeLongWords(postJsonObject['object']['content'], 40, [])
objectContent = removeTextFormatting(objectContent)
objectContent = \
switchWords(baseDir, nickname, domain, objectContent)
objectContent = htmlReplaceEmailQuote(objectContent)
objectContent = htmlReplaceQuoteMarks(objectContent)
if not isPGPEncrypted(postJsonObject['object']['content']):
if not isPatch:
objectContent = \
removeLongWords(postJsonObject['object']['content'], 40, [])
objectContent = removeTextFormatting(objectContent)
objectContent = \
switchWords(baseDir, nickname, domain, objectContent)
objectContent = htmlReplaceEmailQuote(objectContent)
objectContent = htmlReplaceQuoteMarks(objectContent)
else:
objectContent = \
postJsonObject['object']['content']
else:
objectContent = \
postJsonObject['object']['content']
objectContent = '🔒 ' + translate['Encrypted']
objectContent = '<article>' + objectContent + '</article>'