Remove fancy unicode characters from names and bio text

merge-requests/30/head
Bob Mottram 2022-07-09 23:01:38 +01:00
parent 66fcf918a8
commit 1128d1ad6c
2 changed files with 4 additions and 1 deletions

View File

@ -1122,7 +1122,7 @@ def get_display_name(base_dir: str, actor: str, person_cache: {}) -> str:
if name_found:
if dangerous_markup(name_found, False):
name_found = "*ADVERSARY*"
return name_found
return standardize_text(name_found)
def display_name_is_emoji(display_name: str) -> bool:

View File

@ -10,6 +10,7 @@ __module_group__ = "Web Interface"
import os
from pprint import pprint
from webfinger import webfinger_handle
from utils import standardize_text
from utils import get_display_name
from utils import is_group_account
from utils import has_object_dict
@ -651,6 +652,8 @@ def html_profile(signing_priv_key_pem: str,
add_emoji_to_display_name(session, base_dir, http_prefix,
nickname, domain,
profile_json['summary'], False)
if profile_description:
profile_description = standardize_text(profile_description)
posts_button = 'button'
following_button = 'button'
followers_button = 'button'