Strip unrenderable unicode sequences in info box

This commit is contained in:
Mark Qvist
2025-12-29 14:37:18 +01:00
parent d3ddfd6c9c
commit b4c656770f

View File

@@ -85,7 +85,7 @@ class AnnounceInfo(urwid.WidgetWrap):
type_string = "Peer " + g["peer"]
try:
data_str = announce[2].decode("utf-8")
data_str = strip_modifiers(announce[2].decode("utf-8"))
data_style = ""
if trust_level != DirectoryEntry.TRUSTED and len(data_str) > 32:
data_str = data_str[:32]+" [...]"