Fix #135999: Extensions: Remove emails in bl_info['author']

Previously when an addon is expanded on the UI, the "Maintainer" string
would be cut short until a `<` character, to prevent showing e-mail on the
UI, however there could be more than one person/email entries in there
so to prevent cutting short the string, now we use regex to take out the
email part only, so full maintainer string is displayed.

Pull Request: https://projects.blender.org/blender/blender/pulls/136031
This commit is contained in:
YimingWu
2025-03-24 07:35:44 +01:00
committed by YimingWu
parent 2f41aa6a52
commit 68a0e68bcd
3 changed files with 9 additions and 2 deletions

View File

@@ -712,6 +712,12 @@ def module_bl_info(mod, *, info_basis=None):
_blender_manual_url_prefix(),
)
# Remove the maintainers email while it's not private, showing prominently
# could cause maintainers to get direct emails instead of issue tracking systems.
import re
if "author" in addon_info:
addon_info["author"] = re.sub(r"\s*<.*?>", "", addon_info["author"])
addon_info["_init"] = None
return addon_info