From 1128d1ad6c7792e6cae34a33c57411badc770406 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 9 Jul 2022 23:01:38 +0100 Subject: [PATCH] Remove fancy unicode characters from names and bio text --- utils.py | 2 +- webapp_profile.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 9d0603b66..6b0d8c258 100644 --- a/utils.py +++ b/utils.py @@ -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: diff --git a/webapp_profile.py b/webapp_profile.py index e9081db9d..9e3ffabcc 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -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'