Filter display name

alt-html-css
Bob Mottram 2020-12-19 12:55:40 +00:00
parent 86c1a678dc
commit 536a69e8ef
2 changed files with 8 additions and 3 deletions

View File

@ -3885,8 +3885,12 @@ class PubServer(BaseHTTPRequestHandler):
# change displayed name
if fields.get('displayNickname'):
if fields['displayNickname'] != actorJson['name']:
actorJson['name'] = \
displayName = \
removeHtml(fields['displayNickname'])
if not isFiltered(baseDir,
nickname, domain,
displayName):
actorJson['name'] = displayName
actorChanged = True
# change media instance status

View File

@ -881,6 +881,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
PGPpubKey = getPGPpubKey(actorJson)
PGPfingerprint = getPGPfingerprint(actorJson)
if actorJson.get('name'):
if not isFiltered(baseDir, nickname, domain, actorJson['name']):
displayNickname = actorJson['name']
if actorJson.get('summary'):
bioStr = \